[Bug c++/42655] ! causes the qualified types for rvalue
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Jan 8 03:23:00 GMT 2010
------- Comment #1 from pinskia at gcc dot gnu dot org 2010-01-08 03:22 -------
Looks like it is only an issue with ! (and bool) and not with any other
expression really.
template<typename T>
void unused(T const &) { }
int main() {
volatile int x = false;
unused(x-0);
}
Causes unused<int>() to be called.
Also note !!x uses volatile bool which is also wrong.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid, wrong-code
Summary|Don't qualify rvalues of |! causes the qualified types
|non-class types |for rvalue
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42655
More information about the Gcc-bugs
mailing list