Skip to content
Snippets Groups Projects
Commit 06041b2c authored by Marek Polacek's avatar Marek Polacek
Browse files

c++: delayed noexcept in member function template [PR99980]

Some time ago I noticed that we don't properly delay parsing of
noexcept for member function templates.  This patch fixes that.

It didn't work because even though we set CP_PARSER_FLAGS_DELAY_NOEXCEPT
in cp_parser_member_declaration, member template declarations take
a different path: we call cp_parser_template_declaration and return
prior to setting the flag.

	PR c++/99980

gcc/cp/ChangeLog:

	* parser.c (cp_parser_single_declaration): Maybe pass
	CP_PARSER_FLAGS_DELAY_NOEXCEPT down to cp_parser_init_declarator.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp0x/noexcept71.C: New test.
parent 93faac7e
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment