This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/42440] optimization bug with btwowc(EOF) in wchar.h
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Dec 2009 00:32:15 -0000
- Subject: [Bug c/42440] optimization bug with btwowc(EOF) in wchar.h
- References: <bug-42440-18587@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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