This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/18514] [3.4/4.0 Regression] Alternate "asm" name ignored for redeclared builtin function imported into namespace std
- From: "gdr at integrable-solutions dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Nov 2004 11:46:12 -0000
- Subject: [Bug c++/18514] [3.4/4.0 Regression] Alternate "asm" name ignored for redeclared builtin function imported into namespace std
- References: <20041116043152.18514.austern@apple.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From gdr at integrable-solutions dot net 2004-11-30 11:46 -------
Subject: Re: [3.4/4.0 Regression] Alternate "asm" name ignored for redeclared builtin function imported into namespace std
"austern at apple dot com" <gcc-bugzilla@gcc.gnu.org> writes:
| So what to do about this? In principle, I think the answer is that
| builtin_function is doing something wrong by calling
| builtin_function_1 twice, once for the global namespace and once for
| namespace std. If we really must define all builtins in namespace
| std (what's the rationale?), then at least we should do it with a
| using-declaration instead of creating two entirely separate decls.
| This would help compile
I believe what happened there is that it was an attempt to implement
the standard mandated semantics where names in <xxx.h> appears to be
using-declarations for names in <cxx> -- except that the actual
implementation gets everything wrong :-/
So the idea was that we get an artificial declaration in both :: and
std::. If we actually write a decl in std::, that is it; same if we
write it in ::. Except that the artificial declaration in :: should
have been a using-declaration for the "real" artificial declaration in
std::. And attributes and whatever should apply transparently to
both -- because they have extern "C" language specification. That is
what failed.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18514