This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
C++ c-headers=c (and c_compatability headers) vs c-headers=c-std
- From: Danny Smith <danny_r_smith_2001 at yahoo dot co dot nz>
- To: libstdc <libstdc at gcc dot gnu dot org>, newlib at sources dot redhat dot com
- Date: Mon, 23 Sep 2002 13:32:20 +1000 (EST)
- Subject: C++ c-headers=c (and c_compatability headers) vs c-headers=c-std
I have begun to modify mingw32 C-runtime headers so that they could be
used with the --enable-cheaders=c plus c-compatability headers model
for GCC 3.3 I was intending to use the newlib headers as a model.
However, looking at the newlib libc headers, I think I misunderstand something.
Which of these interpretations is correct for this model.
When a C-forwarding header, such as cstdio, is included:
1) _All_ typedefs and prototypes declared in eg stdio.h are declared in
namespace std (and not in global) in the C-runtime header.
2) _Only_ those [ISO C90] names that are explicitly listed for the headers
in ISO/IEC 1482 are declared in std. Non-ISO names go into global namespace.
Looking at the newlib headers, it seems that something very close to
(1)is being implemented there. However (2) is more consistent with
the namespace --enable-cheaders=c-std model and is how I have been
modifying mingw headers.
What am I missing?
Danny
http://mobile.yahoo.com.au - Yahoo! Messenger for SMS
- Always be connected to your Messenger Friends