public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/17041] New: [regression 3.5] Erroneous "suggest parentheses around assignment used as truth value" warning in template members.
@ 2004-08-15 22:38 carlo at gcc dot gnu dot org
  2004-08-15 22:54 ` [Bug c++/17041] [3.5 regression] " bangerth at dealii dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: carlo at gcc dot gnu dot org @ 2004-08-15 22:38 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2004-08-19 14:09 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-15 22:38 [Bug c++/17041] New: [regression 3.5] Erroneous "suggest parentheses around assignment used as truth value" warning in template members carlo at gcc dot gnu dot org
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

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