Created on 2013-06-29.00:00:00 last changed 49 months ago
[Moved to DR at the November, 2014 meeting.]
Additional note, May, 2014:
It was observed that this resolution would allow a definition of main as a C-linkage variable in a namespace. The issue is being returned to "review" status for further discussion.
Proposed resolution (February, 2014):
Change 9.11 [dcl.link] paragraph 6 as follows:
...An entity with C language linkage shall not be declared with the same name as
an entityin global scope, unless both declarations denote the same entity; no diagnostic is required if the declarations appear in different translation units...
Additional note (February, 2014):
See also issue 1838 for an interaction with using-declarations.
According to 9.11 [dcl.link] paragraph 6,
An entity with C language linkage shall not be declared with the same name as an entity in global scope, unless both declarations denote the same entity; no diagnostic is required if the declarations appear in different translation units.
This restriction is too broad; it does not allow for the so-called stat hack, where a C-linkage function and a class are both declared in global scope, and it does not allow for function overloading, either. It should be revised to apply only to variables.
|2017-02-06 00:00:00||admin||set||status: drwp -> cd4|
|2015-05-25 00:00:00||admin||set||status: dr -> drwp|
|2015-04-13 00:00:00||admin||set||messages: + msg5372|
|2014-11-24 00:00:00||admin||set||status: ready -> dr|
|2014-07-07 00:00:00||admin||set||status: review -> ready|
|2014-05-27 00:00:00||admin||set||messages: + msg4992|
|2014-05-27 00:00:00||admin||set||status: ready -> review|
|2014-03-03 00:00:00||admin||set||messages: + msg4826|
|2014-03-03 00:00:00||admin||set||messages: + msg4825|
|2014-03-03 00:00:00||admin||set||status: drafting -> ready|
|2013-10-14 00:00:00||admin||set||status: open -> drafting|