autoconf-patches
[Top][All Lists]
Advanced

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

Re: C++ fix and test


From: Alexandre Oliva
Subject: Re: C++ fix and test
Date: 18 Dec 2000 05:43:37 -0200
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands)

On Dec 18, 2000, Pavel Roskin <address@hidden> wrote:

> On 18 Dec 2000, Alexandre Oliva wrote:
>> On Dec 18, 2000, Pavel Roskin <address@hidden> wrote:
>> 
>> >    * aclang.m4: (AC_LANG_SOURCE(C++)): Don't declare exit().
>> >    Define it as a macro.
>> 
>> I'd rather just have something like:
>> 
>> #ifdef __cplusplus
>> #include <stdlib.h>
>> #endif

> Shouldn't this be safer:

> #ifdef __cplusplus
> extern "C" {
> #include <stdlib.h>
> }
> #endif

I don't know :-(

On one hand, this may ``fix'' headers that miss the needed extern "C";
on the other, it may break C++-aware headers in case they contain, for
example, overloaded declarations of certain (possibly internal)
functions :-(


Maybe we have to test what the preferred way to obtain a declaration
of exit() is, and use it in all C++ tests?

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  address@hidden, redhat.com}
CS PhD student at IC-Unicamp        address@hidden, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me



reply via email to

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