mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-24 19:21:12 +08:00
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.
This commit is contained in:
parent
a5ed4958a2
commit
0968f7da26
gcc
@ -1,3 +1,8 @@
|
||||
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>
|
||||
|
||||
PR c++/92440
|
||||
|
@ -12848,6 +12848,7 @@ grokdeclarator (const cp_declarator *declarator,
|
||||
memfn_quals |= type_memfn_quals (type);
|
||||
rqual = type_memfn_rqual (type);
|
||||
type_quals = TYPE_UNQUALIFIED;
|
||||
raises = TYPE_RAISES_EXCEPTIONS (type);
|
||||
}
|
||||
}
|
||||
|
||||
|
6
gcc/testsuite/g++.dg/cpp1z/noexcept-type22.C
Normal file
6
gcc/testsuite/g++.dg/cpp1z/noexcept-type22.C
Normal file
@ -0,0 +1,6 @@
|
||||
// PR c++/90731
|
||||
// { dg-do compile { target c++17 } }
|
||||
|
||||
typedef void T() noexcept(true);
|
||||
T t;
|
||||
void t() noexcept(true);
|
Loading…
x
Reference in New Issue
Block a user