This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/52869] [DR 1207] "this" not being allowed in noexcept clauses


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 ?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]