From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5EC573857C4F; Sat, 13 Apr 2024 23:29:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5EC573857C4F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1713050982; bh=DM+ksH05JaSas/ReDKde890fBqreN6i0JGSiJvgVezk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=OiXUoe84g0zBOMKZcXtTy2ReNu43yvs6BhpmKoMDpqR5j6fY0l0M0C6c7qvhrajYh d31SkykzM9D1NZGR4hglnUcXRfkpUx3GBrTwWXHplTgelSinODUUpZEl6I6vCbnMBU syMyeZwWpacMILo6IJGizjqerRrRyRoEBAlpe+Co= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/94753] -undef, c++20 and feature-test macros Date: Sat, 13 Apr 2024 23:29:41 +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: 10.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: pinskia at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status assigned_to 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=3D94753 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot = gnu.org --- Comment #1 from Andrew Pinski --- I am going to fix this for GCC 15. The check for -undef is done way to early it seems in c_cpp_builtins . Basically the code to define the feature macros need to be moved to before = that check. The reason why __cplusplus works is because that is done via libcpp rather = than from the front-end.=