This is the mail archive of the gcc@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]

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?




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