From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 57AAF394843F; Tue, 22 Mar 2022 17:05:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 57AAF394843F From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/105009] [12 Regression] Fails to build with --target=xtensa-esp32-elf Date: Tue, 22 Mar 2022 17:05:56 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: build X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2022 17:05:56 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105009 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #2 from Jakub Jelinek --- That message is clearly from clang++, when I try: extern inline __attribute__ ((__gnu_inline__)) int tree_to_poly_int64 (int i) { return i + 1; } int tree_to_poly_int64 (int i) { return i + 2; } clang++ complains: error: redefinition of a 'extern inline' function 'tree_to_poly_int64' is n= ot supported in C++ Those inlines in tree.h are guarded with #if !defined ENABLE_TREE_CHECKING && (GCC_VERSION >=3D 4003) and #define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__) If you are using the ill-designed -fgnuc-version=3D option for clang, don't. While I've added a hack for it for libstdc++ headers, there is no way we are going to do this everywhere in GCC sources itself. __GNUC__ macro doesn't mean support for GNU extensions, it means using the = GCC compiler or at least something compatible with it up to the version, which perhaps ICC more/less is, but clang certainly is not.=