public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug stdio/27087] New: PowerPC: Redefinition error with Clang from IEEE redirection headers
@ 2020-12-17  7:38 qiu.chaofan at outlook dot com
  2021-10-08 12:33 ` [Bug stdio/27087] " tuliom at ascii dot art.br
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: qiu.chaofan at outlook dot com @ 2020-12-17  7:38 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=27087

            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 <stdio.h>
    int main(void) { return 0; }

Use clang (I tried with latest build, but recent releases should be all fine)
to compile this program with IEEE and optimization options:

    clang test.c -O3 -mabi=ieeelongdouble -I<HEADER_PATH>

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 <bits/stdio-ldbl.h> stuff, so compiler
complains about the re-declaration conflict. Not sure why GCC is silent about
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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-11-29 22:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-17  7:38 [Bug stdio/27087] New: PowerPC: Redefinition error with Clang from IEEE redirection headers qiu.chaofan at outlook dot com
2021-10-08 12:33 ` [Bug stdio/27087] " tuliom at ascii dot art.br
2021-10-08 13:00 ` tuliom at ascii dot art.br
2022-06-23 16:46 ` fweimer at redhat dot com
2022-06-23 16:48 ` fweimer at redhat dot com
2022-06-23 17:54 ` adhemerval.zanella at linaro dot org
2022-06-23 18:27 ` fweimer at redhat dot com
2022-06-30 22:07 ` tuliom at ascii dot art.br
2022-09-10  9:48 ` glaubitz at physik dot fu-berlin.de
2022-11-17 14:37 ` tuliom at ascii dot art.br
2022-11-29 22:36 ` tuliom at ascii dot art.br

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).