This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: libstc++ expectations for newlib's string.h
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: Joel Sherrill <joel dot sherrill at OARcorp dot com>
- Cc: jjohnstn at redhat dot com, eric dot norum at usask dot ca, newlib at sources dot redhat dot com, libstdc++ at gcc dot gnu dot org
- Date: Fri, 23 Aug 2002 10:01:38 -0700
- Subject: Re: libstc++ expectations for newlib's string.h
- Organization: Red Hat / San Francisco
- References: <50E9F2E2-B5F6-11D6-914D-00039366A118@usask.ca><3D6549F6.196EB815@redhat.com><3D66342C.8EFF7C1C@OARcorp.com>
> > > I'd just like to add that the problem shows up in the C++ header
> > > bits/locale_facets.tcc which uses strdup. This makes it impossible to
> > > compile some otherwise-valid C++ programs with -ansi and the newlib
> > > headers.
Well, I think the problem is with libstdc++ and not newlib. Correctly
nailing C89, C99, and the GNU extensions into namespaces has proven to
be difficult. I think there is no reason for newlib to alter includes
for this case based on __cplusplus.
Instead, this should probably be fixed in the C++ library.
> > `-ansi'
> > In C mode, support all ANSI standard C programs. In C++ mode,
> > remove GNU extensions that conflict with ISO C++.
This is incorrect for GNU C++ post 3.0.x, as _GNU_SOURCE is defined in
CPLUSPLUS_CPP_SPEC.
This is currently a low-to-medium priority issue.
-benjamin