Commit 701bd2a2 by Jason Merrill Committed by Jason Merrill

re PR c++/52906 (ICE: SIGSEGV in check_tag_decl (decl.c:4230) with…

re PR c++/52906 (ICE: SIGSEGV in check_tag_decl (decl.c:4230) with "__attribute__ ((__deprecated__));" alone)

	PR c++/52906
	* decl.c (check_tag_decl): Don't complain about attributes if we
	don't even have a type.

From-SVN: r186345
parent adee67b3
2012-04-11 Jason Merrill <jason@redhat.com>
PR c++/52906
* decl.c (check_tag_decl): Don't complain about attributes if we
don't even have a type.
2012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
* cvt.c (convert_to_void): Update comment.
......
......@@ -4224,7 +4224,7 @@ check_tag_decl (cp_decl_specifier_seq *declspecs)
error ("%<constexpr%> cannot be used for type declarations");
}
if (declspecs->attributes && warn_attributes)
if (declspecs->attributes && warn_attributes && declared_type)
{
location_t loc;
if (!CLASS_TYPE_P (declared_type)
......
2012-04-11 Jason Merrill <jason@redhat.com>
PR c++/52906
* g++.dg/ext/attrib45.C: New.
* g++.dg/eh/dtor3.C: New.
2012-04-11 Richard Guenther <rguenther@suse.de>
......
// PR c++/52906
__attribute__ ((__deprecated__)); // { dg-error "does not declare anything" }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment