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: "neroden at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Nov 2004 00:21:00 -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 neroden at gcc dot gnu dot org 2004-11-27 00:20 -------
In 3.4.2 (Debian's version), I can import into *any* namespace (xxx, for
instance) and get the same "problem". However, it *is* essential that the
function be "snprintf", and not "bar". fancy_snprintf is invoked if gcc is
invoked with -fno-builtin-snprintf.
So this looks like an issue with builtins; the builtin is not being overridden
by the explicit declaration. I believe this is semi-documented behavior,
though I suppose it could be documented better.
In 4.0.0, this indeed only happens when importing into std (otherwise
fancy_snprintf is used). It still must be "snprintf" rather than, for
instance, "bar", and the problem still goes away when -fno-builtin-snprintf
is used.
So it still seems to be a problem with builtins, but for some reason 4.0
treats importing a builtin into std differently from importing it into xxx,
while 3.4 doesn't (so this bug should be hit *more* in 3.4).
Resummarizing to note that this is strictly a builtin issue.
--
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |3.4.2 4.0.0
Last reconfirmed|2004-11-16 04:37:01 |2004-11-27 00:20:57
date| |
Summary|[3.4/4.0 Regression] |[3.4/4.0 Regression]
|Alternate "asm" name ignored|Alternate "asm" name ignored
|for function imported into |for redeclared builtin
|namespace std |function imported into
| |namespace std
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18514