[Bug c/42440] optimization bug with btwowc(EOF) in wchar.h

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon Dec 21 00:32:00 GMT 2009



------- Comment #6 from pinskia at gcc dot gnu dot org  2009-12-21 00:32 -------
(In reply to comment #4)
> > Works for me.  The preprocessed source is certainly not what was compiled
> 
> Yes, it was.  But I apologize, the invocation needs to include -std=gnu99 to
> observe the problem, e.g., gcc -std=gnu99 -O2 conftest.i.  Without that option,
> indeed, the resulting executables runs ok.


In fact if you are using -std=gnu99 then the behavior here is correct to the
C99 standard's "extern inline" behavior.  the function is exported no matter
what for extern inline in C99, this is why gnu_inline exists.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42440



More information about the Gcc-bugs mailing list