public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "aldot at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/36282] Spurious warning "asm declaration ignored due to conflict with previous rename"
Date: Thu, 21 Mar 2013 18:21:00 -0000	[thread overview]
Message-ID: <bug-36282-4-y1KZLjrewp@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-36282-4@http.gcc.gnu.org/bugzilla/>


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36282

Bernhard Reutner-Fischer <aldot at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-03-21
                 CC|                            |aldot at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #3 from Bernhard Reutner-Fischer <aldot at gcc dot gnu.org> 2013-03-21 18:21:00 UTC ---
Confirmed.

Still the same with gcc version 4.7.2 (Debian 4.7.2-5):
$ cat <<EOF | gcc -x c -c - -o /dev/null
#pragma weak __pthread_initialize
extern void *memcpy(void *dest, const void *src, int n);
extern typeof(memcpy) memcpy asm("__GI_memcpy");
EOF
<stdin>:2:14: warning: conflicting types for built-in function ‘memcpy’
[enabled by default]
<stdin>:3:1: warning: asm declaration ignored due to conflict with previous
rename [-Wpragmas]
>From gcc-bugs-return-418034-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Mar 21 19:30:59 2013
Return-Path: <gcc-bugs-return-418034-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 22806 invoked by alias); 21 Mar 2013 19:30:59 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 22788 invoked by uid 48); 21 Mar 2013 19:30:52 -0000
From: "jed at 59A2 dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/56683] New: Function types with different language linkages not distinct
Date: Thu, 21 Mar 2013 19:30:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jed at 59A2 dot org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Changed-Fields:
Message-ID: <bug-56683-4@http.gcc.gnu.org/bugzilla/>
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-SW-Source: 2013-03/txt/msg01475.txt.bz2
Content-length: 1216


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56683

             Bug #: 56683
           Summary: Function types with different language linkages not
                    distinct
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jed@59A2.org


Section 7.5.1 of C++98 and C++11 states:

    Two function types with different language linkages are
    distinct types even if they are otherwise identical.

If the types are distinct, then surely we can overload on that basis:

    extern "C" typedef int (*CPtr)(void);
    extern "C++" typedef int (*CxxPtr)(void);

    int Klutz(CPtr f) { return f(); }
    int Klutz(CxxPtr f) { return f(); }

This compiles cleanly with Sun and Cray C++ compilers, but not with GCC, Clang,
Intel, MSVC, IBM XL, PathScale, or PGI.

    $ g++ klutz.cc
    klutz.cc: In function ‘int Klutz(CxxPtr)’:
    klutz.cc:5:5: error: redefinition of ‘int Klutz(CxxPtr)’
    klutz.cc:4:5: error: ‘int Klutz(CPtr)’ previously defined here
>From gcc-bugs-return-418036-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Mar 21 19:42:12 2013
Return-Path: <gcc-bugs-return-418036-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 27774 invoked by alias); 21 Mar 2013 19:42:11 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 27581 invoked by uid 48); 21 Mar 2013 19:42:05 -0000
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/2316] g++ fails to overload on language linkage
Date: Thu, 21 Mar 2013 19:42:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Keywords: ABI, accepts-invalid, rejects-valid
X-Bugzilla-Severity: normal
X-Bugzilla-Who: pinskia at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Changed-Fields: CC
Message-ID: <bug-2316-4-B6LW6qgf55@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-2316-4@http.gcc.gnu.org/bugzilla/>
References: <bug-2316-4@http.gcc.gnu.org/bugzilla/>
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
Content-Type: text/plain; charset="UTF-8"
MIME-Version: 1.0
X-SW-Source: 2013-03/txt/msg01477.txt.bz2
Content-length: 471


http://gcc.gnu.org/bugzilla/show_bug.cgi?id#16

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jed at 59A2 dot org

--- Comment #47 from Andrew Pinski <pinskia at gcc dot gnu.org> 2013-03-21 19:42:03 UTC ---
*** Bug 56683 has been marked as a duplicate of this bug. ***


       reply	other threads:[~2013-03-21 18:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-36282-4@http.gcc.gnu.org/bugzilla/>
2013-03-21 18:21 ` aldot at gcc dot gnu.org [this message]
2013-04-11  8:00 ` [Bug middle-end/36282] [4.7/4.8/4.9 Regression] " rguenth at gcc dot gnu.org
2014-03-13 14:05 ` jakub at gcc dot gnu.org
2014-03-13 20:56 ` jakub at gcc dot gnu.org
2014-03-13 20:57 ` [Bug middle-end/36282] [4.7/4.8 " jakub at gcc dot gnu.org
2014-04-10  7:48 ` jakub at gcc dot gnu.org
2014-04-10  8:04 ` [Bug middle-end/36282] [4.7 " jakub at gcc dot gnu.org
2014-06-12 12:53 ` rguenth at gcc dot gnu.org
2014-06-12 12:53 ` rguenth at gcc dot gnu.org
2021-08-29 21:54 ` pinskia at gcc dot gnu.org
2021-12-22  2:09 ` pinskia at gcc dot gnu.org
2008-05-20 19:45 [Bug c/36282] New: " vda dot linux at googlemail dot com
2008-05-20 19:48 ` [Bug middle-end/36282] " vda dot linux at googlemail dot com
2010-02-17  6:18 ` raj dot khem at gmail dot com

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-36282-4-y1KZLjrewp@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.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).