decl.c (bad_specifiers): Don't allow exception specifications on any typedefs.
* decl.c (bad_specifiers): Don't allow exception specifications on any typedefs. From-SVN: r46285
This commit is contained in:
parent
5b0b42ed61
commit
e1be26f4f2
|
@ -1,3 +1,8 @@
|
||||||
|
2001-10-15 Richard Sandiford <rsandifo@redhat.com>
|
||||||
|
|
||||||
|
* decl.c (bad_specifiers): Don't allow exception specifications
|
||||||
|
on any typedefs.
|
||||||
|
|
||||||
2001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
|
2001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
|
||||||
|
|
||||||
* cp/lex.c (init_cp_pragma): Similarly.
|
* cp/lex.c (init_cp_pragma): Similarly.
|
||||||
|
|
|
@ -8643,8 +8643,10 @@ bad_specifiers (object, type, virtualp, quals, inlinep, friendp, raises)
|
||||||
object, type);
|
object, type);
|
||||||
if (friendp)
|
if (friendp)
|
||||||
cp_error_at ("`%D' declared as a friend", object);
|
cp_error_at ("`%D' declared as a friend", object);
|
||||||
if (raises && !TYPE_PTRFN_P (TREE_TYPE (object))
|
if (raises
|
||||||
&& !TYPE_PTRMEMFUNC_P (TREE_TYPE (object)))
|
&& (TREE_CODE (object) == TYPE_DECL
|
||||||
|
|| (!TYPE_PTRFN_P (TREE_TYPE (object))
|
||||||
|
&& !TYPE_PTRMEMFUNC_P (TREE_TYPE (object)))))
|
||||||
cp_error_at ("`%D' declared with an exception specification", object);
|
cp_error_at ("`%D' declared with an exception specification", object);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue