This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/29765] New: -Wparentheses does not warn on single equals sign inside if statement
- From: "bart dot vanassche at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Nov 2006 15:50:09 -0000
- Subject: [Bug c++/29765] New: -Wparentheses does not warn on single equals sign inside if statement
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
When compiling the following code with -Wparentheses, no warning is shown:
cat <<EOF >missing-parentheses.cpp
int main(int argc, char** argv)
{
int a = 1;
int b = 2;
if (a = b)
a++;
return 0;
}
EOF
g++ -c -Wparentheses missing-parentheses.cpp
--
Summary: -Wparentheses does not warn on single equals sign inside
if statement
Product: gcc
Version: 3.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bart dot vanassche at gmail dot com
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: powerpc-unknown-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29765