incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: -nostdinc++ gcc option is required?
Date Sun, 14 Oct 2007 22:31:21 GMT
Farid Zaripov wrote:
>   Why -nostdinc++ compiler option is used when building the stdcxx on
> gcc?

To prevent the native C++ headers from being accidentally included.

> 
>   I know that this option prevents including the gcc C++ headers, but
> the C++
> headers are included on MSVC and nothing bad was happen on this.

I'm not sure there is a way to remove the "native" C++ headers from
the MSVC preprocessor search path. We did have serious problems on
this platform dues to some of the native headers (the C++ C libc
kind, maybe?) #including the Dinkumware <yvals.h> which contains
at least one macro (was it _STD?) with the same name as ours. In
general, mixing headers from two different implementations of the
same library often leads to problems that can be extremely hard
to diagnose (ODR violations), so we go the extra mile to prevent
this from happening. On some platforms, it may not be necessary
at the moment, but there's always the possibility that it will
become necessary in the future, however remote it may seem now.

> 
>   As for gcc, the all configuration tests which are uses typeid operator
> are failed to compile with error: must #include <typeinfo> before using
> typeid

Right. We need to deal with this, certainly if it's affecting
the correctness or functionality of our library (in which case,
we need a test case :) Please open an issue for this problem
and copy the test case into it.

Martin

Mime
View raw message