Stefan Krah added the comment:

+1 for removing all occurrences of "register".


Regarding the grammar, we have:

function-definition:
    declaration-specifiers-opt declarator declaration-list-opt 
compound-statement


So I think that "part of an external declaration" refers to the outermost
declaration-specifiers, not to some inner declaration-specifiers that are
part of the parameter-type-list. Otherwise it would also be forbidden to
use "register" in the compound-statement. ;)

Thus, IMO this is legal:

   a) int f (register int x) {return x;}


But this is not allowed:

   b) register int f (int x) {return x;}


As Mark said, a) does not alter the calling convention. It's just a request
to keep x in a register in the function body once the parameter passing is
done.

----------
nosy: +skrah

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18090>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to