This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: bug?
- From: skaller <skaller at users dot sourceforge dot net>
- To: John Love-Jensen <eljay at adobe dot com>
- Cc: MSX to GCC <gcc-help at gcc dot gnu dot org>
- Date: Tue, 23 Oct 2007 02:42:04 +1000
- Subject: Re: bug?
- References: <C341EE33.262D2%eljay@adobe.com>
On Mon, 2007-10-22 at 06:05 -0500, John Love-Jensen wrote:
> 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.
That isn't possible: many headers (eg Posix) are C only (*.h files).
gcc takes care to allow mixing them. C form of C++ header works too.
This is implementation dependent, but gcc implements it very well
IMHO: magically symbols are both ::symbol and std::symbol... :)
What actually happened was me being stupid:
namespace X {
#include <cstddef>
}
woops! It would be cool if there were some magic to
warn about this, eg:
#pragma SHOULD_BE_GLOBAL
#pragma SHOULD_BE_GLOBAL_OR_STD
--
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net