https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63831
emsr at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #33949|0 |1
is obsolete| |
Attachment #33952|0 |1
is obsolete| |
--- Comment #10 from emsr at gcc dot gnu.org ---
Created attachment 33958
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33958&action=edit
Add a callback for preprocessor pretty printing.
As noted, the real answer to prevent these preprocessor-only crashes is to
provide a callback that handles __has_attribute.
I don't know how "pretty" the output is - I figure we can address that later if
needs be.
But the crashing doesn't happen and we get output.
Testsuite is still running.
--------------------------------------------------
libcpp:
2014-11-13 Edward Smith-Rowland <[email protected]>
* expr.c (parse_has_attribute): Only call pfile->cb.has_attribute
if it is non-null.
gcc/c-family:
2014-11-13 Edward Smith-Rowland <[email protected]>
* c-lex.c (cb_has_attribute): Remove old comment.
* c-cppbuiltin.c (cb_has_attribute): New callback;
(init_pp_output): Set it.
gcc/testsuite:
2014-11-13 Edward Smith-Rowland <[email protected]>
* g++.dg/cpp1y/pr63831.C: New.
* g++.dg/cpp1y/pr63831.h: New.