* c-typeck.c (lvalue_or_else): Pass msgid directly to error.
testsuite:
* gcc.dg/pr17730-1.c: New test
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88343
138bc75d-0d04-0410-961f-
82ee72b054a4
+2004-09-30 Joseph S. Myers <jsm@polyomino.org.uk>
+
+ PR c/17730
+ * c-typeck.c (lvalue_or_else): Pass msgid directly to error.
+
2004-09-30 Diego Novillo <dnovillo@redhat.com>
* tree-ssa-alias.c (collect_points_to_info_r): Move analysis of
}
/* Return nonzero if REF is an lvalue valid for this language;
- otherwise, print an error message and return zero. */
+ otherwise, print an error message and return zero. MSGID
+ is a format string which receives no arguments, but in which
+ formats such as %< and %> may occur. */
static int
lvalue_or_else (tree ref, const char *msgid)
int win = lvalue_p (ref);
if (! win)
- error ("%s", msgid);
+ error (msgid);
return win;
}
+2004-09-30 Joseph S. Myers <jsm@polyomino.org.uk>
+
+ PR c/17730
+ * gcc.dg/pr17730-1.c: New test
+
2004-09-29 Joseph S. Myers <jsm@polyomino.org.uk>
PR c/7425
--- /dev/null
+/* Test formatting of message for invalid lvalue. Bug 17730. */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+char *p = &'C'; /* { dg-error "error: invalid lvalue in unary '&'" } */