This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/58950] New: [4.9 Regression] Missing "statement has no effect"


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

            Bug ID: 58950
           Summary: [4.9 Regression] Missing "statement has no effect"
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: glisse at gcc dot gnu.org

void f(){
  int i __attribute__((vector_size(2*sizeof(int)))) = { 2, 3 };
  __builtin_shuffle (i, i);
}

g++-4.8:
x.c:3:3: warning: statement has no effect [-Wunused-value]

gcc-4.9:
x.c:3:3: warning: value computed is not used [-Wunused-value]

g++-4.9: nothing :-(
We do warn for i+i, but not for (i+i) (again this is missing only in C++).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]