STL and pthread

Richard Henderson rth@cygnus.com
Sun Feb 1 17:43:00 GMT 1998


On Sun, Feb 01, 1998 at 05:12:16PM -0800, H.J. Lu wrote:
> The g++ STL may include <pthread.h>, which may use many non ANSI C++
> stuff, like sigset_t. But the g++ test suite uses -ansi -pedantic-errors
> in g++.brendan, g++.jason and g++.pt. It causes problems on glibc 2
> since sigset_t won't be defined if -ansi is used.

This type of problem comes up every once in a while on axp-list,
since a number of X programs set -ansi as well.

I tend to think -ansi should be removed from the testsuite and
a note added to the documentation that -ansi may turn on strict
ISO C compliance in the system libraries and should not be used
unless that's really what you mean, which is almost never.

Of course, this is a bit more special situation in that the STL
is supposed to be implementing part of the ANSI C++ standard
library, so anything just using libstdc++ should be justified in
using -ansi.  Hmm,...


r~



More information about the Gcc mailing list