This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/33176] strange diagnostic with "if (a) && b"
- 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: 29 Aug 2007 00:06:14 -0000
- Subject: [Bug c++/33176] strange diagnostic with "if (a) && b"
- References: <bug-33176-6594@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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