This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: nonnull markings in sys/cdefs.h causes trouble with gcc-3.3 ?
On Thursday 07 April 2005 10:57 pm, Daniel Jacobowitz wrote:
> On Thu, Apr 07, 2005 at 09:54:41PM -0500, Mike Frysinger wrote:
> > On Thursday 07 April 2005 10:42 pm, Roland McGrath wrote:
> > > Like I said, don't request the libc function to be declared. You can
> > > do what you want with names not in the libc name space you are
> > > compiling against. If you want strcasestr to yourself, don't use
> > > _GNU_SOURCE.
> >
> > well like i half said, simply doing '#include <string.h>' will declare
> > strcasestr(), even if you dont '#define _GNU_SOURCE' before hand:
> > $ cat string.cpp
> > #include <string.h>
> > $ g++ -E string.cpp | grep -A 1 strcasestr
> > extern char *strcasestr (__const char *__haystack, __const char
> > *__needle) throw () __attribute__ ((__pure__)) __attribute__
> > ((__nonnull__ (1, 2)));
>
> G++ defines -D_GNU_SOURCE for you.
yeah, i neglected to mention that :)
at any rate, ive had my say, it seems to be a bug in gcc-3.3.x, people are
aware of the issue and it's a WONTFIX on the glibc side, so i'll probably bug
the gcc peeps and see if they care to fix it in the 3.3 branch
thanks Roland & Daniel
-mike