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 libstdc++/51785] gets not anymore declared


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

--- Comment #22 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-03-01 13:50:57 UTC ---
(In reply to comment #21)
> Wouldn't an unconditional
> 
> #if _GNU_SOURCE
>   extern char *gets (char *__s);
>   using ::gets;
> #endif
> 
> work as well?

extern "C" or extern "C++" ?

What if someone defines _GNU_SOURCE on a non-glibc platform (maybe defined
unconditionally in a makefile, expecting it to do nothing) but it causes gets()
to be declared with a different language linkage to the one in the system's
stdio.h?


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