0710 snap: alpha-osf4.0e: cpp fails on tmp-dum.c

Rodney Brown rdb@localhost
Tue Jul 11 15:59:00 GMT 2000


gcc -c  -DIN_GCC    -g  -W -Wall -Wtraditional -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long  -DHAVE_CONFIG_H    -I. -I../../egcs-20000710/gcc -I../../egcs-20000710/gcc/config -I../../egcs-20000710/gcc/../include ../../egcs-20000710/gcc/gccspec.c
gcc  -DIN_GCC    -g  -W -Wall -Wtraditional -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long  -DHAVE_CONFIG_H  -o xgcc gcc.o gccspec.o intl.o \
  prefix.o version.o  obstack.o   ./intl/libintl.a    -lmld -lexc ../libiberty/libiberty.a
echo "int xxy_us_dummy;" >tmp-dum.c
./xgcc -B/usr/local/alpha-dec-osf4.0e/bin/ -B./ -isystem /usr/local/alpha-dec-osf4.0e/include -S tmp-dum.c
In file included from tmp-dum.c:4294967295:
<stdin>:64: macro names must be identifiers
make[2]: *** [s-under] Error 1
make[2]: Leaving directory `/user/rand/rdb/src/egcs-20000710.obj/gcc'
make[1]: *** [bootstrap-lean] Error 2
make[1]: Leaving directory `/user/rand/rdb/src/egcs-20000710.obj/gcc'
make: *** [bootstrap-lean] Error 2


./xgcc -v --save-temps -B/usr/local/alpha-dec-osf4.0e/bin/ -B./ -isystem /usr/local/alpha-dec-osf4.0e/include -S tmp-dum.c
Using builtin specs.
gcc version 2.96 20000710 (experimental)
 ./cpp -lang-c -v -iprefix ./../lib/gcc-lib/alpha-dec-osf4.0e/2.96/ -isystem ./include -isystem /usr/local/alpha-dec-osf4.0e/bin/include -D__GNUC__=2 -D__GNUC_MINOR__=96 -D__GNUC_PATCHLEVEL__=0 -Dunix -D__osf__ -D_LONGLONG -DSYSTYPE_BSD -D_SYSTYPE_BSD -D__unix__ -D__osf__ -D_LONGLONG -D__SYSTYPE_BSD__ -D_SYSTYPE_BSD -D__unix -D__SYSTYPE_BSD -Asystem(unix) -Asystem(xpg4) -D__LANGUAGE_C__ -D__LANGUAGE_C -DLANGUAGE_C -Acpu(alpha) -Amachine(alpha) -D__alpha -D__alpha__ -D__alpha_ev4__ -Acpu(ev4) -isystem /usr/local/alpha-dec-osf4.0e/include tmp-dum.c tmp-dum.i
GNU CPP version 2.96 20000710 (experimental) (cpplib)

ignoring nonexistent directory "include"
ignoring nonexistent directory "/usr/local/alpha-dec-osf4.0e/bin/include"
ignoring nonexistent directory "../lib/gcc-lib/alpha-dec-osf4.0e/2.96/include"
ignoring nonexistent directory "../alpha-dec-osf4.0e/include"
ignoring nonexistent directory "/usr/local/lib/gcc-lib/alpha-dec-osf4.0e/2.96/include"
ignoring duplicate directory "/usr/local/alpha-dec-osf4.0e/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/alpha-dec-osf4.0e/include
 /usr/local/include
 /usr/include
End of search list.
In file included from tmp-dum.c:4294967295:
<stdin>:64: macro names must be identifiers


sh-2.03$ cat tmp.cpp.bug
br cpp_error_with_line
r -lang-c -v -iprefix ./../lib/gcc-lib/alpha-dec-osf4.0e/2.96/ -isystem ./include -isystem /usr/local/alpha-dec-osf4.0e/bin/include -D__GNUC__=2 -D__GNUC_MINOR__=96 -D__GNUC_PATCHLEVEL__=0 -Dunix -D__osf__ -D_LONGLONG -DSYSTYPE_BSD -D_SYSTYPE_BSD -D__unix__ -D__osf__ -D_LONGLONG -D__SYSTYPE_BSD__ -D_SYSTYPE_BSD -D__unix -D__SYSTYPE_BSD '-Asystem(unix)' '-Asystem(xpg4)' -D__LANGUAGE_C__ -D__LANGUAGE_C -DLANGUAGE_C '-Acpu(alpha)' '-Amachine(alpha)' -D__alpha -D__alpha__ -D__alpha_ev4__ '-Acpu(ev4)' -isystem /usr/local/alpha-dec-osf4.0e/include tmp-dum.c tmp-dum.i < /dev/null
sh-2.03$ gdb ./cpp
GNU gdb 4.18
...
This GDB was configured as "alpha-dec-osf4.0e"...
Breakpoint 1 at 0x3ff800e03a0
.gdbinit:8: Error in sourced command file:
../../egcs-20000710/gcc/.gdbinit:92: Error in sourced command file:
Function "fancy_abort" not defined.
(gdb) source tmp.cpp.bug
Breakpoint 2 at 0x12000aca8: file ../../egcs-20000710/gcc/cpperror.c, line 247.
Breakpoint 1 at 0x3ff800e03a8
GNU CPP version 2.96 20000710 (experimental) (cpplib)

ignoring nonexistent directory "include"
ignoring nonexistent directory "/usr/local/alpha-dec-osf4.0e/bin/include"
ignoring nonexistent directory "../lib/gcc-lib/alpha-dec-osf4.0e/2.96/include"
ignoring nonexistent directory "../alpha-dec-osf4.0e/include"
ignoring nonexistent directory "/usr/local/lib/gcc-lib/alpha-dec-osf4.0e/2.96/include"
ignoring duplicate directory "/usr/local/alpha-dec-osf4.0e/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/alpha-dec-osf4.0e/include
 /usr/local/include
 /usr/include
End of search list.

Breakpoint 2, cpp_error_with_line (pfile=0x140006c20, line=64, column=0, 
    msgid=0x140004300 "macro names must be identifiers")
    at ../../egcs-20000710/gcc/cpperror.c:247
247	  VA_START (ap, msgid);
(gdb) ptype pfile
type = struct cpp_reader {
    cpp_printer *printer;
    cpp_buffer *buffer;
    unsigned char *token_buffer;
...
} *
(gdb) p *pfile
$1 = {printer = 0x140006dc8, buffer = 0x14000e060, 
  token_buffer = 0x140007200 "", token_buffer_size = 200, 
  limit = 0x140007200 "", errors = 0, multiline_string_line = 0, 
  multiline_string_column = 0, system_include_depth = 0, 
  buffer_stack_depth = 2, include_depth = 1, hashtab = 0x140008000, 
  all_include_files = 0x14000b8c0, actual_dirs = 0x14000f280, 
  max_include_len = 36, potential_control_macro = 0x0, col_adjust = 0, 
  token_list = {tokens = 0x14000f818, tokens_used = 3, tokens_cap = 256, 
    namebuf = 0x140011020 "2.96 20000710 (experimental)\"", name_used = 28, 
    name_cap = 1024, directive = 0x0, file = 0x0, line = 0, params_len = 0, 
    paramc = 0, flags = 9}, temp_tokens = 0x0, temp_cap = 0, temp_alloced = 0, 
  temp_used = 0, date = 0x0, time = 0x0, first_directive_token = 0x14000f818, 
  context_cap = 20, cur_context = 0, no_expand_level = 0, paste_level = 0, 
  contexts = 0x140007a00, args = 0x0, deps = 0x0, hash_ob = 0x14000b800, 
  buffer_ob = 0x14000b860, opts = {in_fname = 0x11ffffe57 "tmp-dum.c", 
    out_fname = 0x11ffffe61 "tmp-dum.i", tabstop = 8, pending = 0x140007300, 
    deps_file = 0x0, deps_target = 0x0, quote_include = 0x14000f040, 
    bracket_include = 0x14000f040, map_list = 0x0, 
    include_prefix = 0x11ffffc53 "./../lib/gcc-lib/alpha-dec-osf4.0e/2.96/", 
    include_prefix_len = 40, verbose = 1 '\001', cplusplus = 0 '\000', 
    cplusplus_comments = 1 '\001', objc = 0 '\000', lang_asm = 0 '\000', 
    lang_fortran = 0 '\000', chill = 0 '\000', discard_comments = 1 '\001', 
    trigraphs = 0 '\000', print_deps = 0 '\000', 
    print_deps_missing_files = 0 '\000', print_deps_append = 0 '\000', 
    print_include_names = 0 '\000', pedantic_errors = 0 '\000', 
    inhibit_warnings = 0 '\000', inhibit_errors = 0 '\000', 
    warn_comments = 0 '\000', warn_trigraphs = 0 '\000', 
    warn_import = 1 '\001', warn_traditional = 0 '\000', 
    warn_paste = 1 '\001', warnings_are_errors = 0 '\000', 
    no_output = 0 '\000', remap = 0 '\000', no_line_commands = 0 '\000', 
    ignore_srcdir = 0 '\000', dollars_in_ident = 1 '\001', 
    traditional = 0 '\000', warn_undef = 0 '\000', c89 = 0 '\000', 
    c99 = 1 '\001', pedantic = 0 '\000', preprocessed = 0 '\000', 
    no_standard_includes = 0 '\000', 
    no_standard_cplusplus_includes = 0 '\000', dump_macros = 0 '\000', 
    debug_output = 0 '\000', dump_includes = 0 '\000', 
    show_column = 1 '\001'}, input_stack_listing_current = 0 '\000', 
  import_warning = 0 '\000', done_initializing = 0 '\000', 
  skipping = 0 '\000', save_parameter_spellings = 0 '\000', 
  in_lex_line = 0 '\000', need_newline = 0 '\000', spec_nodes = 0x140007400}
(gdb) l
242	  int column;
243	  const char *msgid;
244	#endif
245	  va_list ap;
246	  
247	  VA_START (ap, msgid);
248	  
249	#ifndef ANSI_PROTOTYPES
250	  pfile = va_arg (ap, cpp_reader *);
251	  line = va_arg (ap, int);
(gdb) bt
#0  cpp_error_with_line (pfile=0x140006c20, line=64, column=0, 
    msgid=0x140004300 "macro names must be identifiers")
    at ../../egcs-20000710/gcc/cpperror.c:247
#1  0x12001c304 in get_define_node (pfile=0x140006c20)
    at ../../egcs-20000710/gcc/cpplib.c:258
#2  0x12001c414 in do_define (pfile=0x140006c20)
    at ../../egcs-20000710/gcc/cpplib.c:291
#3  0x120015d78 in _cpp_run_directive (pfile=0x140006c20, dir=0x140004038, 
    buf=0x11ffff890 "__VERSION__ \"2.96 20000710 (experimental)\"\n", count=43)
    at ../../egcs-20000710/gcc/cpplex.c:3328
#4  0x12001fae4 in cpp_define (pfile=0x140006c20, 
    str=0x14000f340 "__VERSION__=\"2.96 20000710 (experimental)\"")
    at ../../egcs-20000710/gcc/cpplib.c:1457
#5  0x12000612c in initialize_builtins (pfile=0x140006c20)
    at ../../egcs-20000710/gcc/cppinit.c:569
#6  0x120007008 in cpp_start_read (pfile=0x140006c20, print=0x140006dc8, 
    fname=0x11ffffe57 "tmp-dum.c") at ../../egcs-20000710/gcc/cppinit.c:853
#7  0x120004d68 in main (argc=39, argv=0x11ffffa08)
    at ../../egcs-20000710/gcc/cppmain.c:73
(gdb) up 1
#1  0x12001c304 in get_define_node (pfile=0x140006c20)
    at ../../egcs-20000710/gcc/cpplib.c:258
258	      cpp_error_with_line (pfile, token->line, token->col,
(gdb) l
253	  while ((token = cpp_get_token (pfile))->type == CPP_COMMENT)
254	    ;
255	
256	  if (token->type != CPP_NAME)
257	    {
258	      cpp_error_with_line (pfile, token->line, token->col,
259				   "macro names must be identifiers");
260	      return 0;
261	    }
262	
(gdb) p token
$2 = (cpp_token *) 0x14000b7b8
(gdb) p *token
$3 = {line = 64, col = 0, type = CPP_EQ, flags = 0 '\000', val = {integer = 0, 
    node = 0x0, str = {len = 0, text = 0x0}, aux = 0}}
(gdb) c
Continuing.
In file included from tmp-dum.c:4294967295:
<stdin>:64: macro names must be identifiers

Breakpoint 1, 0x3ff800e03a8 in exit () from /usr/shlib/libc.so
(gdb) c
Continuing.

Program exited with code 041.
(gdb) q


More information about the Gcc-bugs mailing list