From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 541293858D35; Wed, 28 Dec 2022 17:32:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 541293858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1672248773; bh=b+QtL7PQBm1L2dl30pRCfPWhfoqoFPWUG5CDna1yveo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=OiYgBMuYI4hP73avk+WBhRRr/383pVktTNkQ0OUqIRr8EW1MJd3vrNpojikdBNDxr 0RJoneRrT8QApzJIWGTFh6F4n27k6S0cnr02RscOzTvTQXzdOFzZStT9vCI2vLf43F IpbJUOwkQmcl2u19ddoi12wL3QDHNvPFQhhasLZo= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug preprocessor/108244] [13 Regression] `pragma GCC diagnostic` and -E -fdirectives-only causes the preprocessor to become confused Date: Wed, 28 Dec 2022 17:32:53 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: preprocessor X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: diagnostic, ice-on-valid-code, needs-bisection, rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cf_reconfirmed_on bug_status everconfirmed keywords short_desc 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=3D108244 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2022-12-28 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Keywords| |diagnostic, | |needs-bisection, | |rejects-valid Summary|[13 Regression] Cannot |[13 Regression] `pragma GCC |preprocess standard |diagnostic` and -E | header with -E |-fdirectives-only causes |-fdirectives-only |the preprocessor to become | |confused --- Comment #5 from Andrew Pinski --- Reduced testcase that shows the issue (different warning/error message thou= gh): ``` #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wctor-dtor-privacy" #ifdef t #endif ``` This gives: :1:9: warning: extra tokens at end of #ifdef directive 1 | #pragma GCC diagnostic push | ^ Compiler returned: 0=