------- Comment #2 from tromey at gcc dot gnu dot org 2007-01-08 02:14 ------- I looked into this a little bit tonight.
The bug here is that the code for #error calls cpp_output_line, which ends up calling cpp_error_with_line when transforming the trigraph. So, the trigraph warning is emitted before cpp_output_line can emit its \n. At first glance I don't see an elegant fix. Perhaps we could change errors.c to keep a list of errors to print, and then defer printing errors in do_diagnostic. This should not be overly difficult, since libiberty has vasprintf. -- tromey at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tromey at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27777