changes for C++ constructors on psim
Chris Johns
cjohns at cybertec.com.au
Fri May 7 06:20:14 UTC 2004
Ralf Corsepius wrote:
>
> Sorry, no. We had been using <iostream.h> on purpose, because <iostream>
> is a feature having been added by newer C++ standards, not being
> supported by older C++ compilers.
>
This is to bring the test in line with the current standard which seems
like a good idea.
> * <iostream> is not supported by older compilers (e.g. gcc < 3.0)
> => using <iostream> means giving up gcc < 3.0
For C++ this is not unusual. GCC has been making C++ front end changes
for a while that causes C++ code that is not current fail to build.
>
> * <iostream.h> is supported by all current gccs.
> gcc >= 3.0 warns about it.
>
> * Switching between <iostream.h> and <iostream> with autoconf magic
> probably introduces more problems than a single warning on a single file
> does.
>
I agree.
> => Trying to use <iostream> will make further steps inevitable.
> Possible steps:
> * Rely on <iostream> and let building fail otherwise (I.e. abandon gcc <
> 3.0)
Seems ok with me. Can you build RTEMS with older versions of GCC (<3.0)
now ?
My understanding is you could not for other reasons such as movement of
system header files.
> * Add autoconf magic to check for <iostream> and <iostream.h> and switch
> between. This is the portable approach but is highly problematic in
> detail. I'd rather not do this.
Agreed.
> * Add autoconf magic to check for <iostream> and do not compile cdtest
> if <iostream> is not present. Not much different from the previous
> approach and similar problematic.
Agreed.
> * Stay with <iostream.h> and live with the warning. Confusing to users,
> the least problematic approach until somebody wants to use a compiler
> without it (i.e. until gcc abandons "backward" headers - AFAICT, even
> gcc-3.5 still has them, and I don't recall having read about a
> time-frame to finally abandon them)
Not too concerned which way this one goes.
--
Chris Johns
More information about the users
mailing list