This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/81609] incompatible extern C declarations of the same extern function at local scope accepted
- From: "msebor at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 01 Aug 2017 00:05:33 +0000
- Subject: [Bug c++/81609] incompatible extern C declarations of the same extern function at local scope accepted
- Auto-submitted: auto-generated
- References: <bug-81609-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81609
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=32042
--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> ---
It does look similar or related to bug 32042.
The C front-end does the right thing and rejects the mismatched declarations,
so G++ doesn't match its behavior for the equivalent extern "C" case. G++ only
rejects the conflicting declarations if they both have C++ linkage.