This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/21930] [4.1 regression] pretty printer confusion
- From: "gdr at integrable-solutions dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Jun 2005 14:50:34 -0000
- Subject: [Bug c++/21930] [4.1 regression] pretty printer confusion
- References: <20050606143234.21930.reichelt@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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" <gcc-bugzilla@gcc.gnu.org> writes:
| The error message reads:
|
| bug.cc: In function 'void foo(const A<N>&) [with int N = 0]':
| bug.cc:7: instantiated from here
| bug.cc:3: error: no match for 'operator-' in '-((const A<0>&)#'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 A<N>&) [with int N = 0]':
| bug.cc:7: instantiated from here
| bug.cc:3: error: no match for 'operator-' in '-((const A<0>&)(+ 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