This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: preprocessor/6084: cpp Segmentation Fault
- From: 'Neil Booth' <neil at daikokuya dot demon dot co dot uk>
- To: "Gerwin, Joshua A" <joshua dot a dot gerwin at intel dot com>
- Cc: 'Phil Edwards' <phil at jaj dot com>, joshg at hf dot intel dot com,gcc-gnats at gcc dot gnu dot org, rnesius at ichips dot intel dot com,"Nguyen, Tuan" <tuan dot nguyen at intel dot com>, gcc-bugs at gcc dot gnu dot org
- Date: Mon, 15 Apr 2002 19:15:40 +0100
- Subject: Re: preprocessor/6084: cpp Segmentation Fault
- References: <01BDB7EEF8D4D3119D95009027AE999511A3D5D8@FMSMSX33>
Gerwin, Joshua A wrote:-
> OK, here's my theory as to why I think you aren't seeing it in
> maybe_print_line. Often when we compile, we use an optimizing flag (admit
> it, you do this sometimes too!) and in this case the optimizer dropped the
> jump to the separate print_line function and put the fprintf directly in
> maybe_print_line. So in cppmain.c (line 329 by my reckoning), effectively
> substitute
>
> else
> {
> print.lineno = line;
> print_line ("");
> }
>
> with
>
> else
> {
> print.lineno = line;
> if (print.printed) putc ('\n', print.outf);
> print.printed = 0;
> fprintf (print.outf, "# %u \"%s\"%s%s\n",
> print.lineno, print.last_fname, "", print.syshdr_flags);
> }
>
> This saves a subroutine call.
OK. Why can't you give me more info? Like the variables in question;
clearly one is NULL? Maybe investigate why it is NULL in this case
and not when you switch command line args? It would save us both a lot
of time.
Neil.