aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-lex.c
diff options
context:
space:
mode:
authorJoseph Myers <jsm@polyomino.org.uk>2004-09-13 00:53:29 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2004-09-13 00:53:29 +0100
commitbda6743181d05dc6421dc0e120b13f7aba727c58 (patch)
tree55c81129e5904e9a77beedcea89e8ae836694907 /gcc/c-lex.c
parent924479e8e8c53ab678eabe5cb43e10478cd5b763 (diff)
downloadgcc-bda6743181d05dc6421dc0e120b13f7aba727c58.zip
gcc-bda6743181d05dc6421dc0e120b13f7aba727c58.tar.gz
gcc-bda6743181d05dc6421dc0e120b13f7aba727c58.tar.bz2
c-common.c, [...]: Use %q, %< and %> for quoting in diagnostics.
* c-common.c, c-decl.c, c-lex.c, c-objc-common.c, c-opts.c, c-parse.in, c-pragma.c, c-typeck.c: Use %q, %< and %> for quoting in diagnostics. Use %' for English apostrophes. * c-tree.h (ATTRIBUTE_GCC_CDIAG): Define. (pedwarn_c90, pedwarn_c99): Use it. * c-decl.c (lookup_label): Quote label name in diagnostic. * c-parse.in (yyprint): Use ' instead of ` for left quote. * c-typeck.c (warn_for_assignment): Likewise. testsuite: * g++.dg/warn/Wswitch-1.C, g++.dg/warn/Wswitch-2.C, gcc.dg/Wswitch-2.c, gcc.dg/Wswitch-enum.c, gcc.dg/Wswitch.c, gcc.dg/declspec-9.c, gcc.dg/declspec-10.c, gcc.dg/declspec-11.c, gcc.dg/m-un-2.c, gcc.dg/noreturn-1.c, gcc.dg/wtr-conversion-1.c: Update expected messages. From-SVN: r87413
Diffstat (limited to 'gcc/c-lex.c')
-rw-r--r--gcc/c-lex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/c-lex.c b/gcc/c-lex.c
index 5a2d947..d8eaddf 100644
--- a/gcc/c-lex.c
+++ b/gcc/c-lex.c
@@ -584,7 +584,7 @@ interpret_integer (const cpp_token *token, unsigned int flags)
if (itk > itk_unsigned_long
&& (flags & CPP_N_WIDTH) != CPP_N_LARGE
&& ! in_system_header && ! flag_isoc99)
- pedwarn ("integer constant is too large for \"%s\" type",
+ pedwarn ("integer constant is too large for %qs type",
(flags & CPP_N_UNSIGNED) ? "unsigned long" : "long");
value = build_int_cst_wide (type, integer.low, integer.high);
@@ -650,7 +650,7 @@ interpret_float (const cpp_token *token, unsigned int flags)
??? That's a dubious reason... is this a mandatory diagnostic or
isn't it? -- zw, 2001-08-21. */
if (REAL_VALUE_ISINF (real) && pedantic)
- warning ("floating constant exceeds range of \"%s\"", type_name);
+ warning ("floating constant exceeds range of %<%s%>", type_name);
/* Create a node with determined type and value. */
value = build_real (type, real);