]> git.ipfire.org Git - thirdparty/gcc.git/commit
backport: re PR preprocessor/57580 (Repeated _Pragma message directives in macro...
authorJakub Jelinek <jakub@redhat.com>
Thu, 11 Feb 2016 09:09:00 +0000 (10:09 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 11 Feb 2016 09:09:00 +0000 (10:09 +0100)
commitbc269f8069b766cf7008d1f9683853075bd3056e
tree7484c92bb9402989a309a592097ddc6c5e3a6701
parentec47d4052727c4628ce82ef27ea925c6b13c857a
backport: re PR preprocessor/57580 (Repeated _Pragma message directives in macro causes problems)

Backported from mainline
2015-12-03  Jakub Jelinek  <jakub@redhat.com>

PR preprocessor/57580
* c-ppoutput.c (print): Change printed field to bool.
(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.

From-SVN: r233321
gcc/c-family/ChangeLog
gcc/c-family/c-ppoutput.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/cpp/pr57580.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/gomp/pr57580.c [new file with mode: 0644]