------- 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

Reply via email to