This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC 3.0.2: errno conflict.
- From: Joe Buck <jbuck at synopsys dot COM>
- To: aoliva at redhat dot com (Alexandre Oliva)
- Cc: max at e-soft dot ru (Maxim Dementiev), gcc at gcc dot gnu dot org
- Date: Fri, 14 Dec 2001 11:32:24 -0800 (PST)
- Subject: Re: GCC 3.0.2: errno conflict.
> On Dec 14, 2001, "Maxim Dementiev" <max@e-soft.ru> wrote:
>
> > Excuse me if this bug is wellknown for peaple.
Alexandre Oliva wrote:
> It's not a bug.
Well, I'm not certain about that ... I think that it is a bug, though
as you say, not in the compiler.
> > This code copile with error by g++ 3.0.2 on Linux 2.2.19 (i386).
> > (See commented line below.)
> > If rename "errno" to "errno1" - all works fine.
> > Is it a bug?
>
> Not really. If it's a bug somewhere, it's in the C library you're
> using. But I'm pretty sure errno is allowed to be defined as a macro,
> since that's the only reasonable way to get per-thread errno
> variables in multi-threaded programs.
Right, errno is allowed to be a macro, but the code in question does not
have an #include of <errno.h> or of <cerrno>. Presumably the header is
indirectly included by some other header. Is errno still in effect a
reserved word in this circumstance? Any standards gurus?