public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/35335] [4.1/4.2/4.3/4.4 regression] Broken diagnostic: 'expr_stmt' not supported by dump_expr
  2008-02-23 19:45 [Bug c++/35335] New: [4.1/4.2/4.3/4.4 regression] Broken diagnostic: 'expr_stmt' not supported by dump_expr reichelt at gcc dot gnu dot org
@ 2008-02-23 19:45 ` reichelt at gcc dot gnu dot org
  2008-02-24 22:01 ` rguenth at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-02-23 19:45 UTC (permalink / raw)
  To: gcc-bugs



-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.1.3


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


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

* [Bug c++/35335]  New: [4.1/4.2/4.3/4.4 regression] Broken diagnostic: 'expr_stmt' not supported by dump_expr
@ 2008-02-23 19:45 reichelt at gcc dot gnu dot org
  2008-02-23 19:45 ` [Bug c++/35335] " reichelt at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-02-23 19:45 UTC (permalink / raw)
  To: gcc-bugs

A broken diagnostic is issued for the following invalid code snippet since
GCC 4.0.0:

====================================================
struct A {};

void foo()
{
  A a;
  a = ({ { 1; } });
}
====================================================

bug.cc: In function 'void foo()':
bug.cc:6: error: no match for 'operator=' in 'a = #'expr_stmt' not supported by
dump_expr#<expression error>'
bug.cc:1: note: candidates are: A& A::operator=(const A&)


-- 
           Summary: [4.1/4.2/4.3/4.4 regression] Broken diagnostic:
                    'expr_stmt' not supported by dump_expr
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: diagnostic, monitored
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


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


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

* [Bug c++/35335] [4.1/4.2/4.3/4.4 regression] Broken diagnostic: 'expr_stmt' not supported by dump_expr
  2008-02-23 19:45 [Bug c++/35335] New: [4.1/4.2/4.3/4.4 regression] Broken diagnostic: 'expr_stmt' not supported by dump_expr reichelt at gcc dot gnu dot org
  2008-02-23 19:45 ` [Bug c++/35335] " reichelt at gcc dot gnu dot org
@ 2008-02-24 22:01 ` rguenth at gcc dot gnu dot org
  2008-07-04 22:35 ` [Bug c++/35335] [4.2/4.3/4.4 " jsm28 at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-02-24 22:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2008-02-24 22:00 -------
Confirmed.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Priority|P3                          |P2
   Last reconfirmed|0000-00-00 00:00:00         |2008-02-24 22:00:44
               date|                            |


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


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

* [Bug c++/35335] [4.2/4.3/4.4 regression] Broken diagnostic: 'expr_stmt' not supported by dump_expr
  2008-02-23 19:45 [Bug c++/35335] New: [4.1/4.2/4.3/4.4 regression] Broken diagnostic: 'expr_stmt' not supported by dump_expr reichelt at gcc dot gnu dot org
  2008-02-23 19:45 ` [Bug c++/35335] " reichelt at gcc dot gnu dot org
  2008-02-24 22:01 ` rguenth at gcc dot gnu dot org
@ 2008-07-04 22:35 ` jsm28 at gcc dot gnu dot org
  2008-11-22 18:21 ` steven at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-07-04 22:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jsm28 at gcc dot gnu dot org  2008-07-04 22:34 -------
Closing 4.1 branch.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.1/4.2/4.3/4.4 regression]|[4.2/4.3/4.4 regression]
                   |Broken diagnostic:          |Broken diagnostic:
                   |'expr_stmt' not supported by|'expr_stmt' not supported by
                   |dump_expr                   |dump_expr
   Target Milestone|4.1.3                       |4.2.5


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


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

* [Bug c++/35335] [4.2/4.3/4.4 regression] Broken diagnostic: 'expr_stmt' not supported by dump_expr
  2008-02-23 19:45 [Bug c++/35335] New: [4.1/4.2/4.3/4.4 regression] Broken diagnostic: 'expr_stmt' not supported by dump_expr reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2008-07-04 22:35 ` [Bug c++/35335] [4.2/4.3/4.4 " jsm28 at gcc dot gnu dot org
@ 2008-11-22 18:21 ` steven at gcc dot gnu dot org
  2009-01-09 16:53 ` jakub at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: steven at gcc dot gnu dot org @ 2008-11-22 18:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from steven at gcc dot gnu dot org  2008-11-22 18:20 -------
With a trivial one-liner patch this could look a lot better:

$ ./cc1plus t.C
 void foo()
t.C:6: error: no match for 'operator=' in 'a = ({...})'
t.C:1: note: candidates are: A& A::operator=(const A&)

Execution times (seconds)
 name lookup           :   0.01 (25%) usr   0.00 ( 0%) sys   0.01 (25%) wall   
  82 kB ( 5%) ggc
 TOTAL                 :   0.03             0.00             0.03              
1508 kB
Extra diagnostic checks enabled; compiler may run slowly.
Configure with --enable-checking=release to disable checks.
$ 


Of course, a message reproducing the source line with a carret and all that
would be even better -- hi Aldy! -- but for now this is probably the best we
can do.

Untested, I have no commitment to this patch ;-)

Index: ../../trunk/gcc/cp/error.c
===================================================================
--- ../../trunk/gcc/cp/error.c  (revision 142123)
+++ ../../trunk/gcc/cp/error.c  (working copy)
@@ -1976,6 +1976,7 @@
       break;

     case BIND_EXPR:
+    case EXPR_STMT:
     case STMT_EXPR:
     case STATEMENT_LIST:
       /* We don't yet have a way of dumping statements in a


-- 


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


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

* [Bug c++/35335] [4.2/4.3/4.4 regression] Broken diagnostic: 'expr_stmt' not supported by dump_expr
  2008-02-23 19:45 [Bug c++/35335] New: [4.1/4.2/4.3/4.4 regression] Broken diagnostic: 'expr_stmt' not supported by dump_expr reichelt at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2008-11-22 18:21 ` steven at gcc dot gnu dot org
@ 2009-01-09 16:53 ` jakub at gcc dot gnu dot org
  2009-01-09 16:54 ` [Bug c++/35335] [4.2/4.3 " jakub at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-01-09 16:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jakub at gcc dot gnu dot org  2009-01-09 16:52 -------
Subject: Bug 35335

Author: jakub
Date: Fri Jan  9 16:51:55 2009
New Revision: 143210

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143210
Log:
        PR c++/35335
        * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.

        * g++.dg/other/error31.C: New testcase.

Added:
    trunk/gcc/testsuite/g++.dg/other/error31.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/error.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/35335] [4.2/4.3 regression] Broken diagnostic: 'expr_stmt' not supported by dump_expr
  2008-02-23 19:45 [Bug c++/35335] New: [4.1/4.2/4.3/4.4 regression] Broken diagnostic: 'expr_stmt' not supported by dump_expr reichelt at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2009-01-09 16:53 ` jakub at gcc dot gnu dot org
@ 2009-01-09 16:54 ` jakub at gcc dot gnu dot org
  2009-03-31 20:46 ` [Bug c++/35335] [4.3 " jsm28 at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-01-09 16:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jakub at gcc dot gnu dot org  2009-01-09 16:53 -------
Fixed on the trunk.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.2/4.3/4.4 regression]    |[4.2/4.3 regression] Broken
                   |Broken diagnostic:          |diagnostic: 'expr_stmt' not
                   |'expr_stmt' not supported by|supported by dump_expr
                   |dump_expr                   |


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


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

* [Bug c++/35335] [4.3 regression] Broken diagnostic: 'expr_stmt' not supported by dump_expr
  2008-02-23 19:45 [Bug c++/35335] New: [4.1/4.2/4.3/4.4 regression] Broken diagnostic: 'expr_stmt' not supported by dump_expr reichelt at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2009-01-09 16:54 ` [Bug c++/35335] [4.2/4.3 " jakub at gcc dot gnu dot org
@ 2009-03-31 20:46 ` jsm28 at gcc dot gnu dot org
  2009-08-04 12:40 ` rguenth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-03-31 20:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jsm28 at gcc dot gnu dot org  2009-03-31 20:45 -------
Closing 4.2 branch.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.2/4.3 regression] Broken |[4.3 regression] Broken
                   |diagnostic: 'expr_stmt' not |diagnostic: 'expr_stmt' not
                   |supported by dump_expr      |supported by dump_expr
   Target Milestone|4.2.5                       |4.3.4


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


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

* [Bug c++/35335] [4.3 regression] Broken diagnostic: 'expr_stmt' not supported by dump_expr
  2008-02-23 19:45 [Bug c++/35335] New: [4.1/4.2/4.3/4.4 regression] Broken diagnostic: 'expr_stmt' not supported by dump_expr reichelt at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2009-03-31 20:46 ` [Bug c++/35335] [4.3 " jsm28 at gcc dot gnu dot org
@ 2009-08-04 12:40 ` rguenth at gcc dot gnu dot org
  2010-04-20 13:40 ` rguenth at gcc dot gnu dot org
  2010-04-20 13:40 ` rguenth at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-08-04 12:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from rguenth at gcc dot gnu dot org  2009-08-04 12:28 -------
GCC 4.3.4 is being released, adjusting target milestone.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.3.4                       |4.3.5


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


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

* [Bug c++/35335] [4.3 regression] Broken diagnostic: 'expr_stmt' not supported by dump_expr
  2008-02-23 19:45 [Bug c++/35335] New: [4.1/4.2/4.3/4.4 regression] Broken diagnostic: 'expr_stmt' not supported by dump_expr reichelt at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2009-08-04 12:40 ` rguenth at gcc dot gnu dot org
@ 2010-04-20 13:40 ` rguenth at gcc dot gnu dot org
  2010-04-20 13:40 ` rguenth at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-04-20 13:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from rguenth at gcc dot gnu dot org  2010-04-20 13:40 -------
Subject: Bug 35335

Author: rguenth
Date: Tue Apr 20 13:39:44 2010
New Revision: 158556

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158556
Log:
2010-04-20  Richard Guenther  <rguenther@suse.de>

        Backport from mainline
        2009-01-09  Jakub Jelinek  <jakub@redhat.com>

        PR c++/35335
        * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.

Modified:
    branches/gcc-4_3-branch/gcc/cp/ChangeLog
    branches/gcc-4_3-branch/gcc/cp/error.c


-- 


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


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

* [Bug c++/35335] [4.3 regression] Broken diagnostic: 'expr_stmt' not supported by dump_expr
  2008-02-23 19:45 [Bug c++/35335] New: [4.1/4.2/4.3/4.4 regression] Broken diagnostic: 'expr_stmt' not supported by dump_expr reichelt at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2010-04-20 13:40 ` rguenth at gcc dot gnu dot org
@ 2010-04-20 13:40 ` rguenth at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-04-20 13:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from rguenth at gcc dot gnu dot org  2010-04-20 13:39 -------
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2010-04-20 13:40 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-23 19:45 [Bug c++/35335] New: [4.1/4.2/4.3/4.4 regression] Broken diagnostic: 'expr_stmt' not supported by dump_expr reichelt at gcc dot gnu dot org
2008-02-23 19:45 ` [Bug c++/35335] " reichelt at gcc dot gnu dot org
2008-02-24 22:01 ` rguenth at gcc dot gnu dot org
2008-07-04 22:35 ` [Bug c++/35335] [4.2/4.3/4.4 " jsm28 at gcc dot gnu dot org
2008-11-22 18:21 ` steven at gcc dot gnu dot org
2009-01-09 16:53 ` jakub at gcc dot gnu dot org
2009-01-09 16:54 ` [Bug c++/35335] [4.2/4.3 " jakub at gcc dot gnu dot org
2009-03-31 20:46 ` [Bug c++/35335] [4.3 " jsm28 at gcc dot gnu dot org
2009-08-04 12:40 ` rguenth at gcc dot gnu dot org
2010-04-20 13:40 ` rguenth at gcc dot gnu dot org
2010-04-20 13:40 ` rguenth at gcc dot gnu dot 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).