public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58589] New: diagnostics: missing proper file:line on C++ compilation error
@ 2013-10-01 11:38 jan.kratochvil at redhat dot com
  2014-06-25 18:44 ` [Bug c++/58589] " manu at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: jan.kratochvil at redhat dot com @ 2013-10-01 11:38 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 58589
           Summary: diagnostics: missing proper file:line on C++
                    compilation error
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jan.kratochvil at redhat dot com
                CC: dodji at gcc dot gnu.org
            Target: x86_64-unknown-linux-gnu

#include <unordered_map>
#include <memory>
class X {
public:
  int a,&b; /* the reference disables default copy constructor */
  X():b(a) {}
};
class Y {
public:
  std::unordered_map<int,std::unique_ptr<X>> x; /* this hides the error line */
} a,b;
int main() { a=b; }

$ g++ -o test6 test6.C -Wall -std=gnu++11 2>&1|grep test6

Actual:
                 from test6.C:1:
                 from test6.C:1:
                 from test6.C:2:
Expected:
                 from test6.C:5:
(or at ltest test6.C:3)

There are many error lines also mentioning 'X' (although neither 'a' or 'b')
but none of them gives any line number where the problem comes from in test6.C.
Editors/IDE (error line parsers) then cannot show where the error comes from.

Also none of the errors is the one making the cause clear which one gets by
using plain 'X x;' (instead of using 'X' in unordered_map):
test6.C:3:7: error: non-static reference member ‘int& X::b’, can’t use default
assignment operator

BTW clang has the same diagnostics problem.
>From gcc-bugs-return-430891-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 01 11:45:34 2013
Return-Path: <gcc-bugs-return-430891-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 1137 invoked by alias); 1 Oct 2013 11:45:34 -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 1088 invoked by uid 48); 1 Oct 2013 11:45:31 -0000
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/58584] [c++11] ICE with invalid argument for alignas
Date: Tue, 01 Oct 2013 11:45: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: error-recovery, ice-on-invalid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: mpolacek at gcc dot gnu.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-Flags:
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-58584-4-uOVeNiofEX@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-58584-4@http.gcc.gnu.org/bugzilla/>
References: <bug-58584-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: 2013-10/txt/msg00035.txt.bz2
Content-length: 495

http://gcc.gnu.org/bugzilla/show_bug.cgi?idX584

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dodji at gcc dot gnu.org,
                   |                            |mpolacek at gcc dot gnu.org

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
The first one started with r192199.


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

* [Bug c++/58589] diagnostics: missing proper file:line on C++ compilation error
  2013-10-01 11:38 [Bug c++/58589] New: diagnostics: missing proper file:line on C++ compilation error jan.kratochvil at redhat dot com
@ 2014-06-25 18:44 ` manu at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: manu at gcc dot gnu.org @ 2014-06-25 18:44 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manu at gcc dot gnu.org

--- Comment #1 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
A minimized testcase would be appreciated:
https://gcc.gnu.org/bugs/minimize.html
>From gcc-bugs-return-454943-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jun 25 18:50:28 2014
Return-Path: <gcc-bugs-return-454943-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 22434 invoked by alias); 25 Jun 2014 18:50:27 -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 22372 invoked by uid 55); 25 Jun 2014 18:50:22 -0000
From: "n8tm at aol dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/61612] trunk revision 211984 winnt.=?UTF-8?Q?c ‘hash_table_c’ does not name a type?Date: Wed, 25 Jun 2014 18:50: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.10.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: n8tm at aol dot com
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-61612-4-Spzy6n76fR@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-61612-4@http.gcc.gnu.org/bugzilla/>
References: <bug-61612-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-06/txt/msg02025.txt.bz2
Content-length: 721

https://gcc.gnu.org/bugzilla/show_bug.cgi?ida612

--- Comment #3 from n8tm at aol dot com ---
On 6/25/2014 1:57 PM, mpolacek at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?ida612
>
> Marek Polacek <mpolacek at gcc dot gnu.org> changed:
>
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>               Status|NEW                         |RESOLVED
>                   CC|                            |mpolacek at gcc dot gnu.org
>           Resolution|---                         |FIXED
>
> --- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
> Should be fixed.
Yes, it works now.  Thanks.


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

end of thread, other threads:[~2014-06-25 18:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-01 11:38 [Bug c++/58589] New: diagnostics: missing proper file:line on C++ compilation error jan.kratochvil at redhat dot com
2014-06-25 18:44 ` [Bug c++/58589] " manu 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).