This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Add option name to trigraph warning
- From: Geoffrey Keating <gkeating at apple dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 21 Jul 2003 15:08:24 -0700 (PDT)
- Subject: Add option name to trigraph warning
Some of the confusion from -Wtrigraphs is from people who want
trigraphs off and are wondering why the compiler is interpreting
trigraphs; this clarifies the warning message a bit by making it more
helpful. (I think you want this whether or not -Wtrigraphs is on by
default.)
I'll wait a bit, and run a testrun on powerpc-darwin, before committing.
--
- Geoffrey Keating <geoffk@apple.com>
===File ~/patches/gcc-trigraphwarningtext.patch=============
2003-07-21 Geoffrey Keating <geoffk@apple.com>
* cpplex.c (_cpp_process_line_notes): Mention option name in
trigraphs warning.
Index: cpplex.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cpplex.c,v
retrieving revision 1.244
diff -u -p -u -p -r1.244 cpplex.c
--- cpplex.c 19 Jul 2003 14:47:01 -0000 1.244
+++ cpplex.c 21 Jul 2003 22:06:06 -0000
@@ -244,9 +244,12 @@ _cpp_process_line_notes (cpp_reader *pfi
note->type,
(int) _cpp_trigraph_map[note->type]);
else
- cpp_error_with_line (pfile, DL_WARNING, pfile->line, col,
- "trigraph ??%c ignored",
- note->type);
+ {
+ cpp_error_with_line
+ (pfile, DL_WARNING, pfile->line, col,
+ "trigraph ??%c ignored, use -trigraphs to enable",
+ note->type);
+ }
}
}
else
============================================================