[Bug c++/33176] strange diagnostic with "if (a) && b"

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Aug 29 00:06:00 GMT 2007



------- Comment #1 from pinskia at gcc dot gnu dot org  2007-08-29 00:06 -------
Not really since this is &&label which is valid GNU C++.

So this is not really a bad diagnostic for GNU C++.
if you add -pedantic, you get:

t.cc:6: error: taking the address of a label is non-standard

Which tells how GCC is parsing this.

I will let others decide if this can be improved.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
           Keywords|                            |diagnostic
            Summary|strange diagnostic          |strange diagnostic with "if
                   |                            |(a) && b"


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33176



More information about the Gcc-bugs mailing list