public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/59324] New: C++11: -Wsequence-point
@ 2013-11-28  8:23 mathieu.malaterre at gmail dot com
  2015-03-16 16:20 ` [Bug c++/59324] " manu at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: mathieu.malaterre at gmail dot com @ 2013-11-28  8:23 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 59324
           Summary: C++11: -Wsequence-point
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mathieu.malaterre at gmail dot com

It would be nice to remove the following warning about UB when compiling in
C++11 mode:


$ cat t.cxx
int main()
{
  int b = 1;    
  int m = (b++) + (++b);
  (void)m;
  return 0;
}

$ g++ -std=c++11 -Wsequence-point t.cxx
t.cxx: In function 'int main()':
t.cxx:4:23: warning: operation on 'b' may be undefined [-Wsequence-point]
   int m = (b++) + (++b);
                       ^


$ g++ --version
g++ (Debian 4.8.2-1) 4.8.2


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

end of thread, other threads:[~2015-03-16 16:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-28  8:23 [Bug c++/59324] New: C++11: -Wsequence-point mathieu.malaterre at gmail dot com
2015-03-16 16:20 ` [Bug c++/59324] " manu at gcc dot gnu.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).