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.



> | I think that the conclusion is that, since you did not include <errno.h>
> | or <cerrno> explicitly, there is a bug.
> 
> No, the C++ standard explicitly grants right to standard headers
> (except those inherited from C and the <cxxx> variants) to #include
> any other header.  A well wriitten C++ program  should not make any
> assumption about which header #includes which.  From that point of
> view, I would say the testcase is ill-designed.

Are you saying, then, that "errno" is a reserved identifier in C++ for all
programs that include any standard headers?  I am skeptical of this
argument.  I suspect that the intent of the language you refer to was to
allow standard functions and classes to wind up defined.

For one thing, it would mean that all C functions are in the global
namespace, since, by your argument, any system header can include any
other header, including the old C headers.

But perhaps we can ask the folks at comp.std.c++ what they think.




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