Created on 2013-06-17.00:00:00 last changed 135 months ago
Rationale (September, 2013):
There was no consensus in CWG for a change to the current rules. 9.11 [dcl.link] paragraph 6 should be read as applying to the C language linkage of the name, not the function type.
Issue 4 separated the concepts of language linkage for names and language linkage for types; since the names of functions with internal linkage are not visible outside their (C++) translation unit, there is no need to restrict overloading of extern "C" functions with internal linkage, e.g.,
extern "C" { static void f(); static void f(int); }
although the types of such functions still have C language linkage and thus can be called via a function pointer from C code.
The change permitting such overloading, however, has not been widely implemented since the resolution of issue 4, leading some to suggest that the unnecessary restriction on function overloading of such functions should be reimposed.
If it is decided to keep the resolution of issue 4, 9.11 [dcl.link] paragraph 6 should be clarified:
At most one function with a particular name can have C language linkage.
Presumably this was overlooked in implementing the intent of the resolution for the issue and is a likely explanation for the reason it is not more widely implemented.
History | |||
---|---|---|---|
Date | User | Action | Args |
2013-10-14 00:00:00 | admin | set | messages: + msg4709 |
2013-10-14 00:00:00 | admin | set | status: open -> nad |
2013-06-17 00:00:00 | admin | create |