public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/53553] New: misleading locations for error in initializers
@ 2012-06-01 13:25 akim.demaille at gmail dot com
  2012-06-01 15:44 ` [Bug c++/53553] " redi at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: akim.demaille at gmail dot com @ 2012-06-01 13:25 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 53553
           Summary: misleading locations for error in initializers
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: akim.demaille@gmail.com


Created attachment 27541
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27541
Test case

In the following example:

struct foo
{
  foo(int a, int b, int c)
    : a_(a)
    , b_(b)
    , c_(c)
  {}
  int* a_;
  int b_;
  int c_;
};

g++ 4.8 reports:

ctor.cc: In constructor 'foo::foo(int, int, int)':
ctor.cc:6:11: error: invalid conversion from 'int' to 'int*' [-fpermissive]
     , c_(c)
           ^
while, of course, the error is on a_, at line 4, not 6.  4.7 is wrong too (it
reports line 6 instead of 4), yet caret-errors make it even more confusing.

Thanks for the good work!


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

* [Bug c++/53553] misleading locations for error in initializers
  2012-06-01 13:25 [Bug c++/53553] New: misleading locations for error in initializers akim.demaille at gmail dot com
@ 2012-06-01 15:44 ` redi at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: redi at gcc dot gnu.org @ 2012-06-01 15:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-06-01 15:43:59 UTC ---
I think this is a duplicate of an old bug, but the carets do make it more
noticeable


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

end of thread, other threads:[~2012-06-01 15:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-01 13:25 [Bug c++/53553] New: misleading locations for error in initializers akim.demaille at gmail dot com
2012-06-01 15:44 ` [Bug c++/53553] " redi 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).