This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/51785] gets not anymore declared
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 01 Mar 2012 13:50:57 +0000
- Subject: [Bug libstdc++/51785] gets not anymore declared
- Auto-submitted: auto-generated
- References: <bug-51785-4@http.gcc.gnu.org/bugzilla/>
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?