From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4A9783892441; Thu, 17 Dec 2020 07:38:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4A9783892441 From: "qiu.chaofan at outlook dot com" To: glibc-bugs@sourceware.org Subject: [Bug stdio/27087] New: PowerPC: Redefinition error with Clang from IEEE redirection headers Date: Thu, 17 Dec 2020 07:38:34 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: stdio X-Bugzilla-Version: 2.32 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: qiu.chaofan at outlook dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Dec 2020 07:38:34 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27087 Bug ID: 27087 Summary: PowerPC: Redefinition error with Clang from IEEE redirection headers Product: glibc Version: 2.32 Status: UNCONFIRMED Severity: normal Priority: P2 Component: stdio Assignee: unassigned at sourceware dot org Reporter: qiu.chaofan at outlook dot com Target Milestone: --- Program to re-produce: #include int main(void) { return 0; } Use clang (I tried with latest build, but recent releases should be all fin= e) to compile this program with IEEE and optimization options: clang test.c -O3 -mabi=3Dieeelongdouble -I An error would happen: In file included from test.c:1: In file included from /opt/at14.0-1-rc1/include/stdio.h:871: /opt/at14.0-1-rc1/include/bits/stdio-ldbl.h:26:20: error: cannot apply = asm label to function after its first use __LDBL_REDIR_DECL (vfprintf) ~~~~~~~~~~~~~~~~~~~^~~~~~~~~ /opt/at14.0-1-rc1/include/sys/cdefs.h:461:26: note: expanded from macro '__LDBL_REDIR_DECL' extern __typeof (name) name __asm (__ASMNAME ("__" #name "ieee128")); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Because under -O, clang (and gcc) defines macro `__USE_EXTERN_INLINES`. The part is located before #include stuff, so compiler complains about the re-declaration conflict. Not sure why GCC is silent abo= ut this yet. By exchanging their position, the error would disappear. Discussion in clang community about changing this error to warning (https://reviews.llvm.org/D16171) may be a good reference. --=20 You are receiving this mail because: You are on the CC list for the bug.=