From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CC39C3858CDB; Mon, 5 Feb 2024 07:07:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CC39C3858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707116868; bh=p48QPfJ9jD7Yct1tk9eNSYpPgYxhksp+geHBrkIRWyg=; h=From:To:Subject:Date:From; b=rdfJY6cg0JTZKJno2bANo5d+0lIGro6wBSeSKXiA0v3qX6yPSkdqHKJld1lMXpg7O lxISahDuBMB72JDu2Lw09xf6eaFc6YAMW51i5xJv7A0UHC8FAvKK0Dk5CSVJK02UM4 /8W0xALqq1grOAATB6TxDvuVtZWQ0Vl2AT+ye0Pk= From: "tanksherman27 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/113760] New: gcc rejects valid empty-declaration in pedantic mode Date: Mon, 05 Feb 2024 07:07:48 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: tanksherman27 at gmail dot com X-Bugzilla-Status: UNCONFIRMED 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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 Bug ID: 113760 Summary: gcc rejects valid empty-declaration in pedantic mode Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: tanksherman27 at gmail dot com Target Milestone: --- In https://github.com/openjdk/jdk/pull/17687#issuecomment-1926154325 we discovered a possible g++ bug where g++ rejects empty semicolons in pedantic mode, this is rather evident in code like #define DEBUG_ONLY(code) code; DEBUG_ONLY(foo()); which will fire a -Werror warning even in C++11 and above, where such empty declarations are allowed=