From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C8A8A3858CDB; Tue, 20 Feb 2024 12:04:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C8A8A3858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1708430690; bh=nPKtfxP8nexbxHibq3NM8fftgEytCsCKCdEzA9L9kpk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=xPTU6XXds2IocJMwIR+A6F4Cl86uxCz+1lfdWqJcHdQ58M1pKDu23mrRFewwtJG3f uqKSr2cjDC06DPEGCLb+yIEm9WEqJ8cwt7CHIJB4Hgzp6p4EWheuB4Mvi4Jb5d+Ih8 oPbFqjuusv5dIJw2MkyqWgBL7LWFnFVt1JCYNxkk= From: "iains at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug preprocessor/114007] gcc chokes on __has_cpp_attribute(clang::unsafe_buffer_usage) Date: Tue, 20 Feb 2024 12:04:49 +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: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: iains 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: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on everconfirmed 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=3D114007 Iain Sandoe changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2024-02-20 Ever confirmed|0 |1 --- Comment #12 from Iain Sandoe --- further the manual says: "The special operator __has_cpp_attribute (operand) may be used in =E2=80= =98#if=E2=80=99 and =E2=80=98#elif=E2=80=99 expressions in C++ code to test whether the attribu= te referenced by its operand is recognized by GCC" Which seems to be explicit about the use in C++ code (which makes me suspect that the availability in C mode might be unintentional). Currently it seems that libcpp makes __has_cpp_attribute an alias for __has_attribute, whereas __has_c_attribute is considered separate in the enumerations.=