psion_lp ICE
Jan Hubicka
jh@suse.cz
Tue Jan 13 15:29:00 GMT 2004
>
> # g++ -Wall -g -O2 -I../utils -c channel.cc -o channel.o -v -save-temps
> Reading specs from /usr/lib64/gcc/x86_64-suse-linux/3.4.0/specs
> Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,f77,objc,java,ada --enable-checking --enable-libgcj --with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib64 --with-system-zlib --enable-shared --enable-__cxa_atexit x86_64-suse-linux
> Thread model: posix
> gcc version 3.4.0 20040112 (experimental) (SuSE Linux)
> /usr/lib64/gcc/x86_64-suse-linux/3.4.0/cc1plus -E -quiet -v -I../utils -D_GNU_SOURCE channel.cc -mtune=k8 -Wall -fworking-directory -O2 -o channel.ii
> #include "..." search starts here:
> #include <...> search starts here:
> ../utils
> /usr/include/g++
> /usr/include/g++/x86_64-suse-linux
> /usr/include/g++/backward
> /usr/local/include
> /usr/lib64/gcc/x86_64-suse-linux/3.4.0/include
> /usr/lib64/gcc/x86_64-suse-linux/3.4.0/../../../../x86_64-suse-linux/include
> /usr/include
> End of search list.
> In file included from /usr/include/g++/backward/stream.h:31,
> from channel.cc:23:
> /usr/include/g++/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
> /usr/lib64/gcc/x86_64-suse-linux/3.4.0/cc1plus -fpreprocessed channel.ii -quiet -dumpbase channel.cc -mtune=k8 -auxbase-strip channel.o -g -O2 -Wall -version -o channel.s
> GNU C++ version 3.4.0 20040112 (experimental) (SuSE Linux) (x86_64-suse-linux)
> compiled by GNU C version 3.4.0 20040112 (experimental) (SuSE Linux).
> GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
> In file included from channel.cc:26:
> channel.h:18: internal compiler error: tree check: expected identifier_node, have integer_cst in c_parse_error, at c-common.c:5906
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <URL:http://www.suse.de/feedback> for instructions.
This is broken error message. C++ parser has a hack to output
CPP_KEYWORDs as identifier. In this case the keyword is booleand
Kind of fix is the patch bellow that makes it to go out as a number. I
am not sure whether "true"/"false" is supposed behaviour but I hope Mark
will know better fix then.
2004-01-13 Jan Hubicka <jh@suse.cz>
* cp/parser.c (cp_parser_error): Avoid ICE when outputing diagnostic
about tokens.
Index: cp/parser.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/parser.c,v
retrieving revision 1.151
diff -c -3 -p -r1.151 parser.c
*** cp/parser.c 12 Jan 2004 16:14:41 -0000 1.151
--- cp/parser.c 13 Jan 2004 15:25:18 -0000
*************** cp_parser_error (cp_parser* parser, cons
*** 1779,1786 ****
c_parse_error (message,
/* Because c_parser_error does not understand
CPP_KEYWORD, keywords are treated like
! identifiers. */
! (token->type == CPP_KEYWORD ? CPP_NAME : token->type),
token->value);
}
}
--- 1779,1789 ----
c_parse_error (message,
/* Because c_parser_error does not understand
CPP_KEYWORD, keywords are treated like
! identifiers or numbers. */
! (token->type == CPP_KEYWORD
! ? (TREE_CODE (token->value) == INTEGER_CST ? CPP_NUMBER
! : CPP_NAME)
! : token->type),
token->value);
}
}
More information about the Gcc-patches
mailing list