This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Possible c++ bug in egcs 2.96 (cvs) and 1.1.2
- To: egcs-bugs at egcs dot cygnus dot com
- Subject: Possible c++ bug in egcs 2.96 (cvs) and 1.1.2
- From: riess at bfw-online dot de
- Date: Fri, 4 Jun 1999 15:48:30 +0200 (MESZ)
Compiling file t.ii
---------------------------------
enum e {one};
struct a {enum e ae: 8;};
struct b {enum e be: 8;};
int main (void)
{ struct a va;
struct b vb;
enum e en = 0? va.ae: vb.be;
(void) en;
return 0;
}
---------------------------------
with gcc -v -Wall t.ii gives
Reading specs from /scratch/e/lib/gcc-lib/i686-pc-linux-gnulibc1/gcc-2.96/specs
gcc version gcc-2.96 19990604 (experimental)
/scratch/e/lib/gcc-lib/i686-pc-linux-gnulibc1/gcc-2.96/cc1plus t.ii -quiet -Wall -version -o /tmp/cceqgaaa.s
GNU C++ version gcc-2.96 19990604 (experimental) (i686-pc-linux-gnulibc1) compiled by GNU C version gcc-2.96 19990604 (experimental).
t.ii: In function `int main()':
t.ii:8: attempt to take address of bit-field structure member `a::ae'
t.ii:8: attempt to take address of bit-field structure member `b::be'
This is with egcs from cvs as of 1999-06-04, but egcs-1.1.2 gives the
same message.
I think this is a bug, as va.ae and vb.be are used strictly by value.
The C frontend does compile the same code.
OS is linux 2.0.36, libc.so.5.4.44
Stephan
--
Stephan Rieß BFW Werner Völk GmbH
riess@bfw-online.de Buero fuer Wärmemeßgeräte
+49 89 82917-452 Bäckerstr. 56
81241 München