From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8F8B33858D37; Tue, 20 Feb 2024 09:43:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8F8B33858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1708422192; bh=jJkD/km2qQr1/Sm9KPR0LsdfbqxyItEreK4ZyLZVWd0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=HyXVyseLNmL+c0kCEGqjmZlD4HrvmhApQ0PeDq86Rqh5OWJOXpALZBT7BRkPfqsQ6 3ODt/IFzCXkwi6WoKQNA/UF7K4LRNXgr3ziOigMTvPjuvGlVHlNyOJtaHTlHyu72Hn FMXoYn/FS5Qab5KdAGnMNV1s+JzQRzYD/uoEIARA= From: "jakub 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 09:43:11 +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: jakub at gcc dot gnu.org 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: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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 --- Comment #8 from Jakub Jelinek --- Anyway, #ifdef __has_c_attribute #if __has_c_attribute (clang::unsafe_buffer_usage) int i; #endif #endif #ifdef __has_cpp_attribute #if __has_cpp_attribute (clang::unsafe_buffer_usage) int j; #endif #endif fails to preprocess with GCC from 5.1 till trunk with -std=3Dc11 and fails = with clang 6 - 16 as well, just clang 17+ accepts it (and obviously the old vers= ions of the compiler don't predefine those macros). So, if they care about portability, they should fix it.=