gcc 2.96 bug
Robin Kirkham
Robin.Kirkham@cmst.csiro.au
Wed Aug 30 21:06:00 GMT 2000
xxx.i:
# 1 "xxx.c"
struct {
int ioffset;
double scale;
int prog;
char *name;
} iio_dmm32at_dacrange[NRANGES] = {
{ 0x800, 10.0/4096, 0, "-5 to +5V" },
{ 0x0, 5.0/4096, 0, "0 to +5V" },
{ 0x800, 20.0/4096, 0, "-10 to +10V" },
{ 0x0, 10.0/4096, 0, "0 to +10V" },
{ 0x0, 1.0/4096, 1, "0 to +pV" },
{ 0x800, 2.0/4096, 1, "-p to +pV" }
};
output from gcc:
% gcc -v --save-temps xxx.c
Reading specs from /opt/gnudev/lib/gcc-lib/sparc-sun-solaris2.5.1/2.96/specs
gcc version 2.96 20000721 (experimental)
/opt/gnudev/lib/gcc-lib/sparc-sun-solaris2.5.1/2.96/cpp -lang-c -v -iprefix
/opt/vxworks/lib/gcc-lib/sparc-sun-solaris2.5.1/2.96/ -D__GNUC__=2
-D__GNUC_MINOR__=96 -D__GNUC_PATCHLEVEL__=0 -Dsparc -Dsun -Dunix -D__svr4__
-D__SVR4 -D__sparc__ -D__sun__ -D__unix__ -D__svr4__ -D__SVR4 -D__sparc -D__sun
-D__unix -Asystem(unix) -Asystem(svr4) -D__GCC_NEW_VARARGS__ -Acpu(sparc)
-Amachine(sparc) xxx.c xxx.i
GNU CPP version 2.96 20000721 (experimental) (cpplib)
(sparc)
ignoring nonexistent directory
"/opt/vxworks/lib/gcc-lib/sparc-sun-solaris2.5.1/2.96/include"
ignoring nonexistent directory "/opt/vxworks/sparc-sun-solaris2.5.1/include"
#include iclude "..." search starts here:
#include iclude <...> search starts here:
/opt/gnudev/include
/opt/gnudev/lib/gcc-lib/sparc-sun-solaris2.5.1/2.96/include
/opt/gnudev/sparc-sun-solaris2.5.1/include
/usr/include
End of search list.
/opt/gnudev/lib/gcc-lib/sparc-sun-solaris2.5.1/2.96/cc1 xxx.i -quiet -dumpbase
xxx.c -version -o xxx.s
GNU C version 2.96 20000721 (experimental) (sparc-sun-solaris2.5.1) compiled by
GNU C version 2.96 20000502 (experimental).
xxx.c:7: `NRANGES' undeclared here (not in a function)
xxx.c:7: Tree check: expected class 't', have 'x' (error_mark)
xxx.c:7: Internal compiler error in grokdeclarator, at c-decl.c:4612
Please submit a full bug report.
See <URL: http://www.gnu.org/software/gcc/bugs.html > for instructions.
%
unpreprocessed source file xxx.c (I should have used NDACRANGES, not NRANGES):
#define NDACRANGES 6
struct {
int ioffset;
double scale;
int prog;
char *name;
} iio_dmm32at_dacrange[NRANGES] = {
{ 0x800, 10.0/4096, 0, "-5 to +5V" },
{ 0x0, 5.0/4096, 0, "0 to +5V" },
{ 0x800, 20.0/4096, 0, "-10 to +10V" },
{ 0x0, 10.0/4096, 0, "0 to +10V" },
{ 0x0, 1.0/4096, 1, "0 to +pV" },
{ 0x800, 2.0/4096, 1, "-p to +pV" }
};
More information about the Gcc-bugs
mailing list