autoconf-patches
[Top][All Lists]
Advanced

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

Re: C++ fix and test


From: Akim Demaille
Subject: Re: C++ fix and test
Date: 20 Dec 2000 17:11:51 +0100
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands)

>>>>> "Alexandre" == Alexandre Oliva <address@hidden> writes:

Alexandre> On Dec 20, 2000, Akim Demaille <address@hidden> wrote:
>>>>>>> "Alexandre" == Alexandre Oliva <address@hidden>
>>>>>>> writes:

Alexandre> If we provide a declaration of exit(int) compatible with
Alexandre> that of stdlib.h, we'll be fine.

>> Why do we try to prototype exit?  I'm lost.

Alexandre> Because in C++ you can't call a function without a prior
Alexandre> declaration.

I mean, as opposed to including the right header.

>> I mean, sure there is the std:: stuff, but we can test for `using
>> std;' and just do that

Alexandre> Nope.  That would change a lot in the results of tests, so
Alexandre> the user would be forced to `using std' too otherwise s/he
Alexandre> might run into differences between the tested behavior and
Alexandre> that observed by his program.

Yep, using std::exit is probably all that is needed.

#include <stdlib.h>
#if supports using
using std::exit;
#endif



reply via email to

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