+2019-03-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/89734
+ * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
+ return type even if quals_used is 0. Formatting fixes.
+
2019-03-14 Richard Biener <rguenther@suse.de>
* c-tree.h (enum c_declspec_il): New.
quals_used &= TYPE_QUAL_ATOMIC;
if (quals_used && VOID_TYPE_P (type) && really_funcdef)
pedwarn (specs_loc, 0,
- "function definition has qualified void return type");
+ "function definition has qualified void "
+ "return type");
else
warning_at (specs_loc, OPT_Wignored_qualifiers,
- "type qualifiers ignored on function return type");
+ "type qualifiers ignored on function "
+ "return type");
/* Ensure an error for restrict on invalid types; the
DR#423 resolution is not entirely clear about
&& (!POINTER_TYPE_P (type)
|| !C_TYPE_OBJECT_OR_INCOMPLETE_P (TREE_TYPE (type))))
error_at (loc, "invalid use of %<restrict%>");
- if (quals_used)
- type = c_build_qualified_type (type, quals_used);
+ type = c_build_qualified_type (type, quals_used);
}
type_quals = TYPE_UNQUALIFIED;
+2019-03-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/89734
+ * gcc.dg/pr89734.c: New test.
+
2019-03-18 Martin Sebor <msebor@redhat.com>
PR tree-optimization/89720