This is the mail archive of the
mailing list for the GCC project.
Re: [Patch to libstdc++]: cheaders=c cstdarg/stdarg.h namespacecontrol
- From: Danny Smith <dannysmith at clear dot net dot nz>
- To: libstdc++ <libstdc++ at gcc dot gnu dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 28 Sep 2002 01:55:56 +0100
- Subject: Re: [Patch to libstdc++]: cheaders=c cstdarg/stdarg.h namespacecontrol
- References: <firstname.lastname@example.org>
- Reply-to: Danny Smith <dannysmith at users dot sourceforge dot net>
I retract this patch submssion. It creates problems with multiple
includes of stdarg.h (eg, the first time with __need__va_list, the
second time without). A local solution can be obtained by fixing the
target C runtime headers, using an additional stdarg.h layer to put the
ginclude'd typedefs into their own namespace and then inject only
va_list int std.
> The include/c/std_cstdarg.h and include/c-compatibility/stdarg.h pair
> makes it difficult to keep std::va_list out of global namespace.
> For example, with mingw32 build:
> code that #includes <cstdio> does this this:
> . D:/MINGW/include/c++/3.3/cstdio
> .. D:/MINGW/include/stdio.h <<< defines __need__va_list
> ... D:/MINGW/include/c++/3.3/stdarg.h
> .... D:/MINGW/include/c++/3.3/cstdarg
> ..... D:/MINGW/include/stdarg.h <<< mingw runtime header that fowards
> ...... D:/MINGW/lib/gcc-lib/mingw32/3.3/include/stdarg.h
> The c-compatibility c++/3.3/stdarg.h included from stdio.h injects
> va_list into global even though the user only includes a std C++
> header and the C stdio.h header was careful to use __need__va_list to
> only get __gnuc_va_list typedef.