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

Reply via email to