[Bug c++/21930] [4.1 regression] pretty printer confusion

2005-06-12 Thread reichelt at gcc dot gnu dot org


-- 
   What|Removed |Added

 CC|roger at eyesopen dot com   |
 AssignedTo|unassigned at gcc dot gnu   |roger at eyesopen dot com
   |dot org |
URL||http://gcc.gnu.org/ml/gcc-
   ||patches/2005-
   ||06/msg01073.html
 Status|NEW |ASSIGNED
   Keywords||patch


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


[Bug c++/21930] [4.1 regression] pretty printer confusion

2005-06-12 Thread cvs-commit at gcc dot gnu dot org

--- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-06-12 
23:46 ---
Subject: Bug 21930

CVSROOT:/cvs/gcc
Module name:gcc
Changes by: [EMAIL PROTECTED]   2005-06-12 23:46:46

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

Log message:
PR c++/21930
* error.c (dump_expr): UNARY_PLUS_EXPR need not handle void types.
Treat CONVERT_EXPR identically to NOP_EXPR.

* g++.dg/other/error10.C: New test case.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gccr1=1.4784r2=1.4785
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/error.c.diff?cvsroot=gccr1=1.282r2=1.283
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gccr1=1.5627r2=1.5628
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/other/error10.C.diff?cvsroot=gccr1=NONEr2=1.1



-- 


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


[Bug c++/21930] [4.1 regression] pretty printer confusion

2005-06-12 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-06-13 
00:41 ---
Fixed.

-- 
   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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


[Bug c++/21930] [4.1 regression] pretty printer confusion

2005-06-06 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-06-06 
14:37 ---
Confirmed, 

-- 
   What|Removed |Added

 CC||pinskia at gcc dot gnu dot
   ||org
 Status|UNCONFIRMED |NEW
 Ever Confirmed||1
   Last reconfirmed|-00-00 00:00:00 |2005-06-06 14:37:10
   date||
   Target Milestone|--- |4.1.0


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


[Bug c++/21930] [4.1 regression] pretty printer confusion

2005-06-06 Thread giovannibajo at libero dot it

--- Additional Comments From giovannibajo at libero dot it  2005-06-06 
14:47 ---
Ot looks like dump_expr must support CONVERT_EXPRs, and just strip them. 
Before, there was no way to discern between unary plus and a real conversion, 
but now they are different codes. Not all occurrences of CONVERT_EXPRs in 
dump_expr where unary pluses, even if we were treating them so.

-- 


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


[Bug c++/21930] [4.1 regression] pretty printer confusion

2005-06-06 Thread gdr at integrable-solutions dot net

--- Additional Comments From gdr at integrable-solutions dot net  
2005-06-06 14:50 ---
Subject: Re:  New: [4.1 regression] pretty printer confusion

reichelt at gcc dot gnu dot org [EMAIL PROTECTED] writes:

| The error message reads:
| 
|   bug.cc: In function 'void foo(const AN) [with int N = 0]':
|   bug.cc:7:   instantiated from here
|   bug.cc:3: error: no match for 'operator-' in '-((const A0)#'convert_expr'
| not supported by dump_expr#expression error)'
| 
| With gcc 4.0.0 I get the following message instead:
| 
|   bug.cc: In function 'void foo(const AN) [with int N = 0]':
|   bug.cc:7:   instantiated from here
|   bug.cc:3: error: no match for 'operator-' in '-((const A0)(+ a))'
| 
| I don't know why the plus sign appears before a, 

The plus sign is a bogosity in the tree representation, not correctly
understaood by the pretty-printer, which cannot differentiate between
conversion from reference to pointer, lvalue-rvalue conversion and
real unary plus. They usually appear under the cover of CONVERT_EXPR.

| but this suggests that
| the regression is related to the recent introduction of UNARY_PLUS_EXPR:
| http://gcc.gnu.org/ml/gcc-patches/2005-05/msg02580.html

Indeed.

-- Gaby


-- 


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