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]

Problem with redefining bool in extern "C"


G'Day,
  In the project I'm working on, there is some code that looks like this:

extern "C" {
#include <curses.h>
}

gcc 2.7 compiles this with the following warning.

dan@gauss[~]> /usr/local/bin/gcc -c extern_test.cpp
In file included from extern_test.cpp:2:
/usr/include/curses.h:82: warning: abstract declarator used as declaration

Line 82 of curses.h is:

typedef char bool;

But the latest snapshot of egcs (Reading specs from 
/local/lib/gcc-lib/mips-sgi-irix6.2/egcs-2.91.54/specs
gcc version egcs-2.91.54 19980816 (gcc2 ss-980609 experimental))
doesn't compile the code:

dan@gauss[~]> /local/bin/gcc -c extern_test.cpp
In file included from extern_test.cpp:2:
/usr/include/curses.h:82: abstract declarator used as declaration

Why has this gone from a warning to an error?

cheers
Dan

-- 
Dan Glastonbury <Dan.Glastonbury at maptek.com.au> 
`We gave you an atomic bomb, what do you want, mermaids?'
  -- I. I. Rabi to the Atomic Energy Commission




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