This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author larry
Recipients Arfrever, Mark.Shannon, larry, mark.dickinson, pitrou, rhettinger, serhiy.storchaka
Date 2013-05-30.15:56:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1369929400.08.0.374481481734.issue18090@psf.upfronthosting.co.za>
In-reply-to
Content
I poked around in a draft of the next ANSI C standard dated April 12 2011.  They don't have much to say about the semantics of "register".  The definition is found in 6.7.1.6:

    A declaration of an identifier for an object with storage-class
    specifier "register" suggests that access to the object be as fast
    as possible.

In a footnote they say you can't take the address of something declared "register".

In 6.7.6.3.2 they explicitly allow using "register" as part of the specification of a function parameter.  However, in 6.9.2 they say "register" cannot appear as part of an external declaration, including those for functions.

6.9.2 is where I stake my claim.  If "register" is irrelevant to calling convention, then why would the C standard preclude using it in an external declaration?  If it had no effect on the call they wouldn't care.

Therefore, declaring a parameter as "register" affects its calling convention.  (Or, it would, if "register" actually did anything). Therefore casting a function from using "register" to not using "register" is a bug.  Therefore we shouldn't do it.
History
Date User Action Args
2013-05-30 15:56:40larrysetrecipients: + larry, rhettinger, mark.dickinson, pitrou, Arfrever, Mark.Shannon, serhiy.storchaka
2013-05-30 15:56:40larrysetmessageid: <1369929400.08.0.374481481734.issue18090@psf.upfronthosting.co.za>
2013-05-30 15:56:40larrylinkissue18090 messages
2013-05-30 15:56:39larrycreate