This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/27777] Bad diagnostic emission when #error contains a trigraph
- From: "tromey at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Feb 2007 19:50:51 -0000
- Subject: [Bug preprocessor/27777] Bad diagnostic emission when #error contains a trigraph
- References: <bug-27777-6809@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from tromey at gcc dot gnu dot org 2007-02-14 19:50 -------
The patch I wrote does work. But now I think deferring error
messages is not the best approach, since it imposes a cost on
all error message output. Instead we could arrange for
#error (and #warning) to build up a message in a buffer which is
then printed after processing the line. That way the cost would
only apply to the #error path.
Also I noticed a call to cpp_output_line in gcc/c-ppoutput.c.
This needs to be checked to see if it suffers from the same bug.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27777