From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B5E823858D32; Fri, 22 Mar 2024 19:36:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B5E823858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1711136197; bh=gV81H6gYkocR+mDZt3vlyBcGCDQ2CN2Saa5dvoEyi3I=; h=From:To:Subject:Date:In-Reply-To:References:From; b=kLYNGziHD9PfM4w3BYchwKYK2QH6U/NmlPYmvDUlZftJmrQ8aY1LTYzNHcoSOvTn7 erwO9en9/e80tFjFddPlDF5r4vvWZpxAANa95yX10uMnumCoajowOdIcPKN1PZ+0BU xWrEwDxS19LsYj8snzQz7+/V1xBiJPI16osXDBJk= From: "lhyatt at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug preprocessor/114436] #pragma GCC system_header vs. _Pragma("GCC system_header") Date: Fri, 22 Mar 2024 19:36:37 +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.2.1 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: lhyatt 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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: everconfirmed cf_reconfirmed_on bug_status cc 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=3D114436 Lewis Hyatt changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Last reconfirmed| |2024-03-22 Status|UNCONFIRMED |NEW CC| |lhyatt at gcc dot gnu.org --- Comment #2 from Lewis Hyatt --- This should fix it correctly, will test it sometime. diff --git a/libcpp/directives.cc b/libcpp/directives.cc index 479f8c716e8..36cc762e704 100644 --- a/libcpp/directives.cc +++ b/libcpp/directives.cc @@ -1986,7 +1986,9 @@ destringize_and_run (cpp_reader *pfile, const cpp_str= ing *in, /* Finish inlining run_directive. */ pfile->buffer->file =3D NULL; + const auto new_sysp =3D pfile->buffer->sysp; _cpp_pop_buffer (pfile); + pfile->buffer->sysp =3D new_sysp; /* Reset the old macro state before ... */ XDELETE (pfile->context);=