From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id D603C383F420 for ; Sat, 31 Jul 2021 14:46:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D603C383F420 Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-249-ayNBfdMVPl21qV5Zrk3jAg-1; Sat, 31 Jul 2021 10:46:53 -0400 X-MC-Unique: ayNBfdMVPl21qV5Zrk3jAg-1 Received: by mail-pl1-f198.google.com with SMTP id x7-20020a170902b407b029012c8cffc695so3904949plr.2 for ; Sat, 31 Jul 2021 07:46:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LPrKuyP5m5iBaql/B2HzyRwN8+n+fltfIQmX9IppWwM=; b=r+nIz5Kmn7gWILHXTIRRmqnFX6xokikiic02XvublPy/FQ3ZBCzAIrZX8krFwI4AIi TDlvPQdN/y4pqN8BzlCP9UV3Mnu1r8gADHA0f4+dol714WPyJirAzoM02LyvuNOAlJaG Sqy66nbx2Ajc30tBA6snaFW5/gm0AI3g1xLXL6ra1/84kp3Ey++fGLJmOqtRpWPW/Abi LD4poS48aAwyoNqPvn6F1u4V8LIit6c1p/6Cq1OlRbbu9nx1Nnp6Yz01QC/t9LHb/hkv ij17t7+1f2XCfH89D+0vPJhX0Y+f2qkJpCZiZ6PRwqgks9OeDgGvayadYvq56uYm0R+W lRbw== X-Gm-Message-State: AOAM533VJcdP1OLg12OiXQKHYDqoEKMwbSzgx2SMY8RDSCZO9Q6TQ4do ALuQ9XuNBVXg2E5jpPdPOEpL6gxX9f1/2z4ZnEZgmAQfh304M8mth7ANp9JweY6vc7ms8zYvcpR V1D9DeTAuKf5ic1FFXOGz7cJO7QsCWYL9Ow== X-Received: by 2002:a17:90a:428e:: with SMTP id p14mr8740980pjg.92.1627742812517; Sat, 31 Jul 2021 07:46:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqLLl8NKFIGxTcSnPhz0RgL9tpiecH88E5xCrTOO4qUMUZN6+7CEOg6f3TDv2Rm3OJFVCXeL5xvejQ3FsfF8I= X-Received: by 2002:a17:90a:428e:: with SMTP id p14mr8740966pjg.92.1627742812190; Sat, 31 Jul 2021 07:46:52 -0700 (PDT) MIME-Version: 1.0 References: <20210730162313.632576-1-jason@redhat.com> In-Reply-To: From: Jason Merrill Date: Sat, 31 Jul 2021 10:46:41 -0400 Message-ID: Subject: Re: [PATCH] c++: Reject anonymous struct with bases To: Andrew Pinski Cc: GCC Patches , Jakub Jelinek X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, HTML_MESSAGE, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2021 14:46:56 -0000 On Fri, Jul 30, 2021 at 3:35 PM Andrew Pinski wrote: > On Fri, Jul 30, 2021 at 9:26 AM Jason Merrill via Gcc-patches > wrote: > > > > In discussion of jakub's patch for C++20 pointer-interconvertibility, it > > came up that we allow anonymous structs to have bases, but don't do > anything > > usable with them. Let's reject it. > > > > The comment change is something I noticed while looking for the right > place > > to diagnose this: finish_struct_anon does not actually check for anything > > invalid, so it shouldn't claim to. > > This should fix PR 96636 by rejecting the code. > Thanks. Jason