From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 90D453858C41; Mon, 5 Feb 2024 07:23:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 90D453858C41 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707117838; bh=Sw9izLC1tcq8qedQYm7Hn0xzAmIWkqmZVAhOgHgJIE0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=pm7y4ADQ5o/hs25nZLBFwwESwrUtJlTcx23vixNHlNUWd2Idf3M6iSqXvnnDeU6nm 2TVYZ4baHw3M67yok7BAOL4PpaVW+583Q9uCpqpML/iwTfvF9Sc+ww0J7G/UrrPbOr IbQuSh/oEVh1ewWjUb9Z2lZ9dW3o21TPfUI6MYew= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/113760] gcc rejects valid empty-declaration in pedantic mode Date: Mon, 05 Feb 2024 07:23:58 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113760 --- Comment #3 from Andrew Pinski --- >From JDK bug report: > It looks like it only removed > the warnings for empty declarations at namespace scope. I couldn't find > anything for other cases, including empty class member declarations. Yes because the C++ defect report was only for `Spurious semicolons at namespace scope should be allowed`. See https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#569 . ``` struct f { int t; ; }; ``` Is not allowed by the C++ standard currently and is a GCC extension, maybe = it should have a seperate flag to control that but I am not 100% sure.=