Larry Hastings added the comment:
Closed as this is a subset of #18722.
--
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18090
Terry J. Reedy added the comment:
Guido, do you still believe in using 'register' in C code in general or in
particular, for function arguments. Many of the uses in dictobject.c go back to
your rev1256 and rev5396. The one that caught Larry's eye for dict_contains
appears to be from the
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18090
___
Larry Hastings added the comment:
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
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
Amaury Forgeot d'Arc added the comment:
If register is irrelevant to calling convention, then why would the C
standard preclude using it in an external declaration?
Maybe here external is the opposite of static: register is OK in a single
translation unit (where the calling convention does
Larry Hastings added the comment:
Having re-read the spec a couple times, I am now thoroughly confused and don't
know what to think. Certainly I now believe I was previously misinterpreting
aspects of the spec.
I still think removing register from the parameter lists of external
functions
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18090
___
___
Mark Dickinson added the comment:
+1 for removing all occurrences of register.
Seconded.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18090
___
Changes by Larry Hastings la...@hastings.org:
--
nosy: +Mark.Shannon, rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18090
___
___
Antoine Pitrou added the comment:
I would recommend suppressing all register keywords from our C source files.
It shouldn't make any difference these days.
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18090
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18090
___
___
Python-bugs-list
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +mark.dickinson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18090
___
___
Mark Shannon added the comment:
The register qualifier on the parameter does not alter the calling convention,
it determines the storage class of the parameter variable within the function.
Having said that I am all in favour in removing any and all register
declarations.
--
Larry Hastings added the comment:
The register qualifier on the parameter does not alter the calling
convention, it determines the storage class of the parameter variable
within the function.
You assert that declaring a parameter as register instructs the compiler that
callers should pass
New submission from Larry Hastings:
I'm monkeying around with CPython trunk, and just noticed the following
declaration in Objects/dictobject.c:
static PyObject *
dict_contains(register PyDictObject *mp, PyObject *key)
Although dict_contains is a static method, it's cast to
16 matches
Mail list logo