This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
fpermissive and bit-fields
- To: "Gcc-Bugs (E-mail)" <gcc-bugs at gcc dot gnu dot org>
- Subject: fpermissive and bit-fields
- From: Andolfato Luigi-LANDOLF1 <luigi dot andolfato at motorola dot com>
- Date: Wed, 21 Feb 2001 10:04:56 -0000
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.