Commit 0968f7da by Jason Merrill

c++: Function declared with typedef with eh-specification.

We just need to handle the exception specification like other properties of
a function typedef.

	PR c++/90731
	* decl.c (grokdeclarator): Propagate eh spec from typedef.
parent a5ed4958
2020-01-28 Jason Merrill <jason@redhat.com>
PR c++/90731
* decl.c (grokdeclarator): Propagate eh spec from typedef.
2020-01-28 Martin Liska <mliska@suse.cz> 2020-01-28 Martin Liska <mliska@suse.cz>
PR c++/92440 PR c++/92440
......
...@@ -12848,6 +12848,7 @@ grokdeclarator (const cp_declarator *declarator, ...@@ -12848,6 +12848,7 @@ grokdeclarator (const cp_declarator *declarator,
memfn_quals |= type_memfn_quals (type); memfn_quals |= type_memfn_quals (type);
rqual = type_memfn_rqual (type); rqual = type_memfn_rqual (type);
type_quals = TYPE_UNQUALIFIED; type_quals = TYPE_UNQUALIFIED;
raises = TYPE_RAISES_EXCEPTIONS (type);
} }
} }
......
// PR c++/90731
// { dg-do compile { target c++17 } }
typedef void T() noexcept(true);
T t;
void t() noexcept(true);
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