This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/52869] [DR 1207] "this" not being allowed in noexcept clauses
- From: "umesh.kalappa0 at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 12 Nov 2018 11:37:15 +0000
- Subject: [Bug c++/52869] [DR 1207] "this" not being allowed in noexcept clauses
- Auto-submitted: auto-generated
- References: <bug-52869-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52869
Umesh Kalappa <umesh.kalappa0 at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |umesh.kalappa0 at gmail dot com
--- Comment #8 from Umesh Kalappa <umesh.kalappa0 at gmail dot com> ---
the following patch fix all the reported cases and tested with latest trunk and
8.1 source i.e
Index: gcc/cp/parser.c
===================================================================
--- gcc/cp/parser.c (revision 266026)
+++ gcc/cp/parser.c (working copy)
@@ -24615,6 +24615,8 @@
{
tree expr;
cp_lexer_consume_token (parser->lexer);
+
+ inject_this_parameter (current_class_type, TYPE_UNQUALIFIED);
if (cp_lexer_peek_token (parser->lexer)->type == CPP_OPEN_PAREN)
{
ok to commit ?