[Bug preprocessor/57580] Repeated _Pragma message directives in macro causes problems
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Feb 10 18:22:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57580
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Wed Feb 10 18:22:19 2016
New Revision: 233284
URL: https://gcc.gnu.org/viewcvs?rev=233284&root=gcc&view=rev
Log:
Backported from mainline
2015-12-03 Jakub Jelinek <jakub@redhat.com>
PR preprocessor/57580
* c-ppoutput.c (print): Change printed field to bool.
Move src_file last for smaller padding.
(init_pp_output): Set print.printed to false instead of 0.
(scan_translation_unit): Fix up formatting. Set print.printed
to true after printing something other than newline.
(scan_translation_unit_trad): Set print.printed to true instead of 1.
(maybe_print_line_1): Set print.printed to false instead of 0.
(print_line_1): Likewise.
(do_line_change): Set print.printed to true instead of 1.
(cb_define, dump_queued_macros, cb_include, cb_def_pragma,
dump_macro): Set print.printed to false after printing newline.
* c-c++-common/cpp/pr57580.c: New test.
* c-c++-common/gomp/pr57580.c: New test.
Added:
branches/gcc-5-branch/gcc/testsuite/c-c++-common/cpp/pr57580.c
branches/gcc-5-branch/gcc/testsuite/c-c++-common/gomp/pr57580.c
Modified:
branches/gcc-5-branch/gcc/c-family/ChangeLog
branches/gcc-5-branch/gcc/c-family/c-ppoutput.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list