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]

typedef'ing of bool in extern "C"


On the project I'm working on there is code that looks like this:
extern "C" {
#include <curses.h>
}

When I compile this with gcc 2.7.2.1 I get 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;

When I try to compile the same code with the 16 Aug snapshot of egcs it 
becomes an error:
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?  Is there a way around the 
problem?

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]