This is the mail archive of the gcc-patches@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: C++ PATCH: PR 9924


>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


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