[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C++ fix and test

From: Pavel Roskin
Subject: Re: C++ fix and test
Date: Wed, 20 Dec 2000 10:46:48 -0500 (EST)


> > Why do you want to try without stdlib.h?
> Because stdlib.h may not be safe for multiple inclusion, and the
> user test may already #include it.

The discussion has reached an interesting point.

I don't have sufficient expertize to argue about whether we should
try compiling without stdlib.h or not, but I'd like to discuss whether
it's fair not to support C++ on the systems that are so badly broken.

Let's think for a minute about the mission of Autoconf. Autoconf is a
portability tool. It aims to support very old systems that may be broken
in different ways. However, it was possible at all mostly beacuse C is not
a very strict language.

Now we are going to handle C++. C++ is more strict, so several old tricks
break. With C++ we cannot declare any function without checking that it's
not declared in a different way. Even checking for a name in a library can
become a hassle.

C++ poses new requirements on the system headers. If those requirements
are not satisfied, the compiler should provide replacement headers or even
replacement libraries. Otherwise the compiler can be considered to be
incompatible with the system libraries.

It is more likely to happen with C++ compilers. We just cannot support C++
on every old machine where we support C.

However, the are some important advantages that C++ gives us. They should
be used.

1) It is very likely that a C compiler is installed on the same systemm,
so that some checks can be done using a C compiler.

2) Systems supporing C++ are usually less broken than those not supporting
it. We don't have to make the same pessimistic assumptions about the C++
compiler that we do about the C compiler.

3) Autoconf should not try to support C++ where it is not properly
installed. For example, it would be fair not to support C++ on systems
where stdlib.h doesn't allow multiple inclusion _and_ the C++ compiler
doesn't have a replacement.

Pavel Roskin

reply via email to

[Prev in Thread] Current Thread [Next in Thread]