public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "carlo at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/17041] New: [regression 3.5] Erroneous "suggest parentheses around assignment used as truth value" warning in template members. Date: Sun, 15 Aug 2004 22:38:00 -0000 [thread overview] Message-ID: <20040815223820.17041.carlo@gcc.gnu.org> (raw) The current CVS (20040813) gives a wrong warning that the compiler never gave before. >g++-cvs-3.5 -Wall -v -c test.cc Reading specs from /usr/src/GNU/install/bin/../lib/gcc/i686-redhat-linux/3.5.0/specs Configured with: /usr/src/gcc/gcc-cvs-3.5/configure --prefix=/usr/local/gcc-cvs-3.5 --enable-shared --with-gnu-as --with-gnu-ld --enable-languages=c++ --enable-debug --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --host=i686-redhat-linux Thread model: posix gcc version 3.5.0 20040813 (experimental) /usr/src/GNU/install/bin/../libexec/gcc/i686-redhat-linux/3.5.0/cc1plus -quiet -v -iprefix /usr/src/GNU/install/bin/../lib/gcc/i686-redhat-linux/3.5.0/ -D_GNU_SOURCE test.cc -quiet -dumpbase test.cc -mtune=pentiumpro -auxbase test -Wall -version -o /tmp/ccVItywf.s ignoring nonexistent directory "/usr/src/GNU/install/bin/../lib/gcc/i686-redhat-linux/3.5.0/../../../../i686-redhat-linux/include" ignoring duplicate directory "/usr/local/gcc-cvs-3.5/lib/gcc/i686-redhat-linux/3.5.0/../../../../include/c++/3.5.0" ignoring duplicate directory "/usr/local/gcc-cvs-3.5/lib/gcc/i686-redhat-linux/3.5.0/../../../../include/c++/3.5.0/i686-redhat-linux" ignoring duplicate directory "/usr/local/gcc-cvs-3.5/lib/gcc/i686-redhat-linux/3.5.0/../../../../include/c++/3.5.0/backward" ignoring duplicate directory "/usr/local/gcc-cvs-3.5/lib/gcc/i686-redhat-linux/3.5.0/include" ignoring nonexistent directory "/usr/local/gcc-cvs-3.5/lib/gcc/i686-redhat-linux/3.5.0/../../../../i686-redhat-linux/include" #include "..." search starts here: #include <...> search starts here: /usr/src/GNU/install/bin/../lib/gcc/i686-redhat-linux/3.5.0/../../../../include/c++/3.5.0 /usr/src/GNU/install/bin/../lib/gcc/i686-redhat-linux/3.5.0/../../../../include/c++/3.5.0/i686-redhat-linux /usr/src/GNU/install/bin/../lib/gcc/i686-redhat-linux/3.5.0/../../../../include/c++/3.5.0/backward /usr/src/GNU/install/bin/../lib/gcc/i686-redhat-linux/3.5.0/include /usr/local/include /usr/local/gcc-cvs-3.5/include /usr/include End of search list. GNU C++ version 3.5.0 20040813 (experimental) (i686-redhat-linux) compiled by GNU C version 3.5.0 20040813 (experimental). GGC heuristics: --param ggc-min-expand=90 --param ggc-min-heapsize=113141 test.cc: In member function `void A<T>::f() [with T = int]': test.cc:14: instantiated from here test.cc:6: warning: suggest parentheses around assignment used as truth value as -V -Qy -o test.o /tmp/ccVItywf.s GNU assembler version 2.14.90.0.8 (i386-redhat-linux) using BFD version 2.14.90.0.8 20040114 Where 'test.cc' is: >cat test.cc template<typename T> struct A { void f() { int i; if ((i = 0)) // LINE 6 return; } }; void g() { A<int> a; a.f(); } -- Summary: [regression 3.5] Erroneous "suggest parentheses around assignment used as truth value" warning in template members. Product: gcc Version: 3.5.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: carlo at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17041
next reply other threads:[~2004-08-15 22:38 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-08-15 22:38 carlo at gcc dot gnu dot org [this message] 2004-08-15 22:54 ` [Bug c++/17041] [3.5 regression] " bangerth at dealii dot org 2004-08-16 17:37 ` pinskia at gcc dot gnu dot org 2004-08-17 15:00 ` reichelt at gcc dot gnu dot org 2004-08-17 15:25 ` jsm at polyomino dot org dot uk 2004-08-17 15:31 ` reichelt at igpm dot rwth-aachen dot de 2004-08-17 15:33 ` carlo at alinoe dot com 2004-08-17 18:23 ` jsm at polyomino dot org dot uk 2004-08-19 8:02 ` cvs-commit at gcc dot gnu dot org 2004-08-19 14:09 ` pinskia at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20040815223820.17041.carlo@gcc.gnu.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).