This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH: PR 9924
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: Danny Smith <dannysmith at users dot sourceforge dot net>
- Cc: dannysmith at clear dot net dot nz, roger at www dot eyesopen dot com, gcc-patches at gcc dot gnu dot org
- Date: Mon, 17 Mar 2003 21:19:21 -0600
- Subject: Re: C++ PATCH: PR 9924
- References: <20030317184233.6902c738.bkoz@redhat.com><001001c2ecf4$dfd3f2e0$6690a7cb@DANNY>
>Yes please. I am aware of this post:
>http://gcc.gnu.org/ml/libstdc++/2002-08/msg00284.html
>glibc-2.3, namespace std work part 1
Huh. I did post this stuff. Cool.
There never was a part two. That's pretty much it, sadly. I think I got
to the point where the "C" includes were sub-including things like
"math.h" and then, at that level of include, my #include_next trickery
for shadowing the real "C" includes fell down.
This is on linux. With only C89 headers, this should not be an issue.
For instance, I know that newlib works, or used to work and should be
able to get going again.
The reason Solaris has this licked is because they only have C89 includes.
>Should ginclude'd files like stddef.h and stdarg.h be made C++ namespace
>aware? This has been a stumbling block when building libstdc++, with
>rewritten mingw32 C headers and cheaders=c model.
Yes. I thought I posted these earlier, as part of the QNX patches. You
might want to search for them. For reference, they are something like
this, for stdarg.h and stddef.h:
#if __cplusplus
namespace std
{
extern "C"
#endif
and then a corresponding bit at the bottom. Really, all you need to do
is make sure that extern "C" bits have a namespace block too.
>This define is used as in your example to enable std namespace for C90
>(not C99) in C runtime headers. Do I understand correctly your comment
>above that POSIX standard names are also meant to go into std
>namespace?
They should not. I'm not quite sure where to put them.
-benjamin