PR c/65066
* c-format.c (check_format_types): Handle null param.
* gcc.dg/pr65066.c: New test.
From-SVN: r220732
+2015-02-16 Marek Polacek <polacek@redhat.com>
+
+ PR c/65066
+ * c-format.c (check_format_types): Handle null param.
+
2015-02-13 Marek Polacek <polacek@redhat.com>
PR c/65040
&& TREE_CODE (cur_type) == INTEGER_TYPE
&& warn_format_signedness
&& TYPE_UNSIGNED (wanted_type)
+ && cur_param != NULL_TREE
&& TREE_CODE (cur_param) == NOP_EXPR)
{
tree t = TREE_TYPE (TREE_OPERAND (cur_param, 0));
+2015-02-16 Marek Polacek <polacek@redhat.com>
+
+ PR c/65066
+ * gcc.dg/pr65066.c: New test.
+
2015-02-16 Ilya Enkovich <ilya.enkovich@intel.com>
* gcc.dg/pr65002.C: Move ...
--- /dev/null
+/* PR c/65066 */
+/* { dg-do compile } */
+/* { dg-options "-Wformat=2" } */
+
+extern int sscanf (const char *restrict, const char *restrict, ...);
+int *a;
+
+void
+foo ()
+{
+ sscanf (0, "0x%x #", a); /* { dg-warning "expects argument of type" } */
+}