This is the mail archive of the gcc-help@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: bug?


Hi skaller,

> This looks like a bug:

Definitely a bug!

It's a bug to use C <x.h> headers in C++ code.  C++ code should use the C++
<x> headers.

> Can anyone see any way this could happen (C++ code,
> using both <x.h> and <x> in various places).

Yes, I can see how that could happen.

C++ code should not use <x.h>, since those are C header files.

Mixing C <x.h> header files in C++ programs can incur all sorts of
interesting subtle side effects.

Use C <x.h> headers for C code.

Use C++ <x> headers for C++ code.

HTH,
--Eljay


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