This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/63831] [5 Regression] r217292 causes segfaults with -MM
- From: "emsr at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 13 Nov 2014 15:22:21 +0000
- Subject: [Bug preprocessor/63831] [5 Regression] r217292 causes segfaults with -MM
- Auto-submitted: auto-generated
- References: <bug-63831-4 at http dot gcc dot gnu dot org/bugzilla/>
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 <3dw4rd@verizon.net>
* 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 <3dw4rd@verizon.net>
* 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 <3dw4rd@verizon.net>
* g++.dg/cpp1y/pr63831.C: New.
* g++.dg/cpp1y/pr63831.h: New.