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

* [Bug c++/60862] bad location in invalid conversion error
  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 ` manu at gcc dot gnu.org
  2014-07-29  4:59 ` mpolacek at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: manu at gcc dot gnu.org @ 2014-04-16 20:15 UTC (permalink / raw)
  To: gcc-bugs

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

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-04-16
                 CC|                            |manu at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
The call_expr passed to convert_like_real has the wrong location. Not sure
where it is built.
>From gcc-bugs-return-449197-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Apr 16 20:16:26 2014
Return-Path: <gcc-bugs-return-449197-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 2167 invoked by alias); 16 Apr 2014 20:16:25 -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 2129 invoked by uid 48); 16 Apr 2014 20:16:21 -0000
From: "trippels at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/60852] [4.8/4.9/4.10 Regression] boost::has_complement of enum class does not compile
Date: Wed, 16 Apr 2014 20:16: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-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: trippels at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: paolo.carlini at oracle dot com
X-Bugzilla-Target-Milestone: 4.8.3
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-60852-4-zQzgKQguI5@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-60852-4@http.gcc.gnu.org/bugzilla/>
References: <bug-60852-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/msg01217.txt.bz2
Content-length: 431

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

--- Comment #16 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
(In reply to Marc Glisse from comment #15)
> Did someone file a corresponding PR for clang? It is useful for them, but
> also for gcc because it gives them a chance to give a different
> interpretation of the standard.

Unfortunately filing bugs for clang is like posting to /dev/null
most of the time.


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

* [Bug c++/60862] bad location in invalid conversion error
  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
  3 siblings, 0 replies; 5+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-07-29  4:59 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |mpolacek at gcc dot gnu.org
            Version|unknown                     |4.10.0
           Assignee|unassigned at gcc dot gnu.org      |mpolacek at gcc dot gnu.org
   Target Milestone|---                         |4.10.0

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Mine for now.


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

* [Bug c++/60862] bad location in invalid conversion error
  2014-04-16 15:30 [Bug c++/60862] New: bad location in invalid conversion error tromey at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2014-09-13  7:55 ` mpolacek at gcc dot gnu.org
@ 2014-09-13  7:55 ` mpolacek at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-09-13  7:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Sat Sep 13 07:54:40 2014
New Revision: 215235

URL: https://gcc.gnu.org/viewcvs?rev=215235&root=gcc&view=rev
Log:
    PR c++/60862
    * parser.c (cp_parser_postfix_expression) <case CPP_OPEN_PAREN>: Set
    location of a call expression.

    * g++.dg/diagnostic/pr60862.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/diagnostic/pr60862.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/parser.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/60862] bad location in invalid conversion error
  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
  3 siblings, 0 replies; 5+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-09-13  7:55 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Fixed on trunk.


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