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]

fpermissive and bit-fields


Hi,
 
why fpermissive flag doesn't convert errors into warning
when a structure identifier has the same name of a bit-field:
 
typedef struct platone {
  int one : 1;
  int platone : 7;   <<=== syntax error before `:'
} PLATONE;
 
while:
 
typedef struct platone {
  int one;
  int platone;  <<=== warning: ANSI C++ forbids data member `platone1' with same name as enclosing class
} PLATONE;
 
I use gcc version 2.95.2 19991024 (release)
and the following command line:
 
g++ -fpermissive -c filename.cpp 
 
 
Thanks in advance,
Luigi Andolfato
 
PS: I know that it's not according to the ANSI C++ standard
but I have to build a C++ system that uses old C headers.
 
 

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