autoconf
[Top][All Lists]
Advanced

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

Re: AC_LANG_SOURCE(C++) and exit


From: Pavel Roskin
Subject: Re: AC_LANG_SOURCE(C++) and exit
Date: Tue, 7 Nov 2000 16:04:30 -0500 (EST)

Hello, Raja!

> AC_LANG_SOURCE(C++) uses 
> 
>   extern "C" void exit (int);

I remember we already discussed it. I believe that there are many issues
here.

1) "return" is rumored to be unportable/unreliable, but does it apply to
C++? I doubt it. It's probably better to use "return" for C++.

2) Even if we go with "exit" we should avoid declaring it by all costs.

3) There macro checks carefully "#ifdef __cplusplus". What happens if
__cplusplus is not defined? Nothing! It should be an error, unless I'm
missing something.

There are many places where `extern "C"' is used. I hope that C++ is not
that broken as C. It should be fair to change the approach taken by
Autoconf to adapt it to the C++ ideology. I.e. if we use C++ and we cannot
find a declaration of foo() we shouldn't use it at all.

We need someone with a good C++ background who could rewrite
AC_LANG_SOURCE(C++) and test it on many compilers.

I hope that you will find time to create a well tested patch and submit it
to address@hidden

Regards,
Pavel Roskin





reply via email to

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