[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with stdbool.h redefining true/false even in C++
From: |
John W. Eaton |
Subject: |
Re: Problem with stdbool.h redefining true/false even in C++ |
Date: |
Wed, 29 Aug 2012 13:36:27 -0400 |
On 29-Aug-2012, Paul Eggert wrote:
| On 08/29/2012 10:00 AM, John W. Eaton wrote:
| > Why define true, false, and bool to anything when using C++?
|
| Maybe it's for '#ifdef bool' but to be honest I'm just doing what
| GCC does. Perhaps you can ask the GCC developers why they do did
| it that way....
|
| Anyway, I'd be surprised if Octave cares whether true, false, and bool
| are macros. If it does, then it's broken on GNUish hosts anyway,
| right? And if it doesn't, the gnulib patch should work as-is.
No, I don't think Octave currently has any checks like this.
For C++ code, I think '#ifdef bool' will be false. So
'#define bool bool' switches the meaning. Should that happen if
stdbool.h has been included? I don't know.
This problem was a surprise to me because we don't include
stdbool.h directly in Octave C++ sources.
jwe
- Re: Problem with stdbool.h redefining true/false even in C++, (continued)
- Re: Problem with stdbool.h redefining true/false even in C++, Paul Eggert, 2012/08/29
- Re: Problem with stdbool.h redefining true/false even in C++, Michael Goffioul, 2012/08/29
- Re: Problem with stdbool.h redefining true/false even in C++, Michael Goffioul, 2012/08/29
- Re: Problem with stdbool.h redefining true/false even in C++, John W. Eaton, 2012/08/29
- Re: Problem with stdbool.h redefining true/false even in C++, John W. Eaton, 2012/08/29
- Re: Problem with stdbool.h redefining true/false even in C++, Paul Eggert, 2012/08/29
- Re: Problem with stdbool.h redefining true/false even in C++, Michael Goffioul, 2012/08/29
- Re: Problem with stdbool.h redefining true/false even in C++, Paul Eggert, 2012/08/29
- Re: Problem with stdbool.h redefining true/false even in C++, Michael Goffioul, 2012/08/29
- Re: Problem with stdbool.h redefining true/false even in C++, Paul Eggert, 2012/08/29
- Re: Problem with stdbool.h redefining true/false even in C++,
John W. Eaton <=
- Re: Problem with stdbool.h redefining true/false even in C++, Bastien ROUCARIES, 2012/08/29
- Re: Problem with stdbool.h redefining true/false even in C++, John W. Eaton, 2012/08/29
- Re: Problem with stdbool.h redefining true/false even in C++, Daniel J Sebald, 2012/08/29
- Re: Problem with stdbool.h redefining true/false even in C++, Paul Eggert, 2012/08/29