public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "qiu.chaofan at outlook dot com" <sourceware-bugzilla@sourceware.org>
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	[thread overview]
Message-ID: <bug-27087-131@http.sourceware.org/bugzilla/> (raw)

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.

             reply	other threads:[~2020-12-17  7:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-17  7:38 qiu.chaofan at outlook dot com [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-27087-131@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).