Re C bug 2035 -
John Smith
john@arrows.demon.co.uk
Tue Apr 24 11:33:00 GMT 2001
I think this is essentially the same as bug 2035, but trimmed down a bit.
The following bit of code generates a gcc internal error:
void mainx(void) {
double v;
struct {
float f;
} d;
v = 1.0 ;
d.f=*(float *)&v;
}
prompt:> gcc -O1 -c main.c
main.c: In function `mainx':
main.c:13: Internal compiler error in `extract_bit_field', at
expmed.c:1082
Please submit a full bug report.
See <URL: http://www.gnu.org/software/gcc/bugs.html > for instructions.
(Using gcc 2.95.3 on i586-pc-linux-gnulibc1)
My real question is: what should happen?
Should the compiler generate an ordinary error message, or should it
carefully store things in memory and interpret the code as best it can?
Is the code actually illegal, or merely dodgy?
John
More information about the Gcc-bugs
mailing list