[Bug preprocessor/37215] ICE on 'gcc -E -dM -fpreprocessed - < /dev/null'
patriciak784-gccmainling at yahoo dot de
gcc-bugzilla@gcc.gnu.org
Sun Jan 15 14:55:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37215
--- Comment #13 from patriciak784-gccmainling at yahoo dot de 2012-01-15 14:27:00 UTC ---
(In reply to comment #12)
> On inspecting this more closely, I agree with patriciak784. The issue isn't
> directly related to the fix of Richard for PR20239.
>
> So I suggest patch for c-family/c-ppoutput.c as following:
>
> Index: c-family/c-ppoutput.c
> ===================================================================
> --- c-family/c-ppoutput.c (revision 183106)
> +++ c-family/c-ppoutput.c (working copy)
> @@ -86,7 +86,7 @@
> {
> /* A successful cpp_read_main_file guarantees that we can call
> cpp_scan_nooutput or cpp_get_token next. */
> - if (flag_no_output)
> + if (flag_no_output && pfile->buffer)
> {
> /* Scan -included buffers, then the main file. */
> while (pfile->buffer->prev)
I'd welcome if this patch was included in GCC.
More information about the Gcc-bugs
mailing list