This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/33208] Broken diagnostic: 'component_ref' not supported by dump_decl
- From: "gdr at cs dot tamu dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Sep 2007 21:59:13 -0000
- Subject: [Bug c++/33208] Broken diagnostic: 'component_ref' not supported by dump_decl
- References: <bug-33208-1771@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from gdr at cs dot tamu dot edu 2007-09-01 21:59 -------
Subject: Re: Broken diagnostic: 'component_ref' not supported by dump_decl
"pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| Another testcase:
| void f(bool *b)
| {
| (*b)--;
| }
|
| And another one:
| bool &g(void);
|
| void f(bool *b)
| {
| g()--;
| }
Interesting testcase. This makes me revise my previous opinion to:
we should not use any of the format specifier at all -- not %qD, not %qE.
| So variable in the error message does not make sense at all. We want to use
| lvalue instead.
What has this to do with lvalue? I believe the restriction is that,
it just does not make any sense to decrement a bool -- be it an lvalue
or an rvalue.
Paolo, what about
error ("invalid use of Boolean expression as operand to %<operator--%>")
?
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33208