This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/18514] [3.4/4.0 Regression] Alternate "asm" name ignored for redeclared builtin function imported into namespace std


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]