This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16696] Strange message when operator++ not found
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Jul 2004 21:08:24 -0000
- Subject: [Bug c++/16696] Strange message when operator++ not found
- References: <20040723203946.16696.bangerth@dealii.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-23 21:08 -------
It is special cased:
case POSTINCREMENT_EXPR:
case POSTDECREMENT_EXPR:
/* Look for an `operator++ (int)'. If they didn't have
one, then we fall back to the old way of doing things. */
if (flags & LOOKUP_COMPLAIN)
pedwarn ("no `%D(int)' declared for postfix `%s', trying prefix operator instead",
fnname,
operator_name_info[code].name);
if (code == POSTINCREMENT_EXPR)
code = PREINCREMENT_EXPR;
else
code = PREDECREMENT_EXPR;
result = build_new_op (code, flags, arg1, NULL_TREE, NULL_TREE,
overloaded_p);
which means -fpermissive does look do the transformation. :(
Why we do this is unknown as it comes from PRE EGCSE (aka CVS days).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16696