aboutsummaryrefslogtreecommitdiff
path: root/gcc/stor-layout.c
diff options
context:
space:
mode:
authorJoseph Myers <jsm@polyomino.org.uk>2004-09-15 21:48:10 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2004-09-15 21:48:10 +0100
commit971801fff6d8eb0df1486fa6b77ba4cfc4616305 (patch)
tree4034f8306b245baf4a83c67767977aaa06c4a83b /gcc/stor-layout.c
parent1daf6f3a5ba3a54bde4b8843b7b75dad3bb536eb (diff)
downloadgcc-971801fff6d8eb0df1486fa6b77ba4cfc4616305.zip
gcc-971801fff6d8eb0df1486fa6b77ba4cfc4616305.tar.gz
gcc-971801fff6d8eb0df1486fa6b77ba4cfc4616305.tar.bz2
attribs.c, [...]: Use %<, %> and %q for quoting in diagnostics going through pretty-print.c.
gcc: * attribs.c, builtins.c, c-format.c, c-pch.c, coverage.c, except.c, fold-const.c, function.c, langhooks.c, params.c, reload.c, reload1.c, stmt.c, stor-layout.c, toplev.c, tree-cfg.c, tree-dump.c, tree-mudflap.c, tree.c, varasm.c: Use %<, %> and %q for quoting in diagnostics going through pretty-print.c. Use '' for quoting in other diagnostic text. * langhooks.c: Include intl.h. Mark text locating diagnostics for translation. * Makefile.in (langhooks.o): Update dependencies. * pretty-print.h (pp_printf): Mark as accepting GCC diagnostic formats. gcc/testsuite: * g++.dg/ext/member-attr.C, g++.dg/warn/deprecated.C, gcc.dg/deprecated.c, gcc.dg/noreturn-1.c, gcc.dg/noreturn-4.c: Update expected messages. libmudflap: * testsuite/libmudflap.c/pass35-frag.c: Update expected message. From-SVN: r87563
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r--gcc/stor-layout.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index 12d6d48..ccbca42 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -149,7 +149,7 @@ variable_size (tree size)
if (lang_hooks.decls.global_bindings_p ())
{
if (TREE_CONSTANT (size))
- error ("type size can't be explicitly evaluated");
+ error ("type size can%'t be explicitly evaluated");
else
error ("variable-size type declared outside of any function");
@@ -455,9 +455,9 @@ layout_decl (tree decl, unsigned int known_align)
int size_as_int = TREE_INT_CST_LOW (size);
if (compare_tree_int (size, size_as_int) == 0)
- warning ("%Jsize of '%D' is %d bytes", decl, decl, size_as_int);
+ warning ("%Jsize of %qD is %d bytes", decl, decl, size_as_int);
else
- warning ("%Jsize of '%D' is larger than %d bytes",
+ warning ("%Jsize of %qD is larger than %d bytes",
decl, decl, larger_than_size);
}
}
@@ -840,9 +840,9 @@ place_field (record_layout_info rli, tree field)
{
if (STRICT_ALIGNMENT)
warning ("%Jpacked attribute causes inefficient alignment "
- "for '%D'", field, field);
+ "for %qD", field, field);
else
- warning ("%Jpacked attribute is unnecessary for '%D'",
+ warning ("%Jpacked attribute is unnecessary for %qD",
field, field);
}
}
@@ -858,7 +858,7 @@ place_field (record_layout_info rli, tree field)
Bump the cumulative size to multiple of field alignment. */
if (warn_padded)
- warning ("%Jpadding struct to align '%D'", field, field);
+ warning ("%Jpadding struct to align %qD", field, field);
/* If the alignment is still within offset_align, just align
the bit position. */
@@ -1230,9 +1230,10 @@ finalize_record_size (record_layout_info rli)
name = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (rli->t)));
if (STRICT_ALIGNMENT)
- warning ("packed attribute causes inefficient alignment for `%s'", name);
+ warning ("packed attribute causes inefficient "
+ "alignment for %qs", name);
else
- warning ("packed attribute is unnecessary for `%s'", name);
+ warning ("packed attribute is unnecessary for %qs", name);
}
else
{