This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: /usr/include/curses.h not fixed on sparc-sun-solaris2.5.1


>>>>> Manfred Hollstein <manfred@s-direktnet.de> writes:

>> I suppose we could modify the GCC build procedure to also ``fix''
>> curses.h to avoid that harmless warning, but I'm not sure it's worth
>> the installation problem.  The warning is issued only in rare cases
>> (namely when using curses.h in C++), and it doesn't hurt anything,
>> whereas the installation problem can cause compilation to fail,
>> sometimes in subtle ways.

It means that sometimes curses code using "bool" gets char, and sometimes a
word-size boolean type.  This could make a difference.

>> If the harmless warning is really bothering you, then I suggest that
>> it be turned off at the C++ compiler level, not at the fixincludes level.
>> That is, it seems to me that
>> 
>> extern "C" {
>>   typedef char bool;
>>   extern int foo(bool);
>> }
>> 
>> should not be an error in C++, since bool is not a builtin type in C.
>> But perhaps a C++ expert can correct me here.

extern "C" does not affect anything but linkage, according to the
standard.  The above typedef is ill-formed, as it contains two
type-specifiers and no declarator.

curses.h should be fixed.

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]