public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/60862] New: bad location in invalid conversion error
@ 2014-04-16 15:30 tromey at gcc dot gnu.org
  2014-04-16 20:15 ` [Bug c++/60862] " manu at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: tromey at gcc dot gnu.org @ 2014-04-16 15:30 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60862
           Summary: bad location in invalid conversion error
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tromey at gcc dot gnu.org

I'm using the Fedora 20 system gcc:

barimba. gcc --version
gcc (GCC) 4.8.2 20131212 (Red Hat 4.8.2-7)

It seems unlikely to me that this bug is caused by Fedora changes.


Consider this source:

extern void **slot(int, void *, int);

void m(int x, int y)
{
  int **s = slot (x, &x, y);
}


Compiling yields:

barimba. g++ --syntax-only e.cc
e.cc: In function ‘void m(int, int)’:
e.cc:5:27: error: invalid conversion from ‘void**’ to ‘int**’ [-fpermissive]
   int **s = slot (x, &x, y);
                           ^

The location of the error seems quite odd to me.
I think it would be better to report the error at the "=".
>From gcc-bugs-return-449175-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Apr 16 15:36:59 2014
Return-Path: <gcc-bugs-return-449175-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 4355 invoked by alias); 16 Apr 2014 15:36: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 4073 invoked by uid 48); 16 Apr 2014 15:36:54 -0000
From: "yufeng at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/60825] [AArch64] int64x1_t, uint64x1_t and float64x1_t are not treated as vector types
Date: Wed, 16 Apr 2014 15:36:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: 4.8.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: yufeng at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: alan.lawrence at arm dot com
X-Bugzilla-Target-Milestone: 4.9.1
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-60825-4-9kYKBPsr8V@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-60825-4@http.gcc.gnu.org/bugzilla/>
References: <bug-60825-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-04/txt/msg01195.txt.bz2
Content-length: 790

http://gcc.gnu.org/bugzilla/show_bug.cgi?id`825

--- Comment #2 from Yufeng Zhang <yufeng at gcc dot gnu.org> ---
Apart from the parameter passing and C++ name mangling issues, there is also an
issue w.r.t. the implicit conversion between the scalar types and their
vector-type peers.  For intrinsics code to be portable, conversion between neon
intrinsics vector types and the scalar types should be done via the
corresponding vcreat and vget_lane intrinsics.  Currently, arm_neon.h has the
following typedefs:

typedef int64_t int64x1_t;
typedef double float64x1_t;
typedef uint64_t uint64x1_t;

which have unfortunately allowed variables of e.g. type int64_t and type
int64x1_t, to be interoperable.  User code replying on this mistake may
encounter compilation errors after the fix.


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

end of thread, other threads:[~2014-09-13  7:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-16 15:30 [Bug c++/60862] New: bad location in invalid conversion error tromey at gcc dot gnu.org
2014-04-16 20:15 ` [Bug c++/60862] " manu at gcc dot gnu.org
2014-07-29  4:59 ` mpolacek at gcc dot gnu.org
2014-09-13  7:55 ` mpolacek at gcc dot gnu.org
2014-09-13  7:55 ` mpolacek at gcc dot gnu.org

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).