public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/60958] New: Initialization of arrays in tr1/regex ill-formed or with undefined behaviour
@ 2014-04-24 20:46 hstong at ca dot ibm.com
  2014-04-25  9:36 ` [Bug libstdc++/60958] " redi at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: hstong at ca dot ibm.com @ 2014-04-24 20:46 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60958
           Summary: Initialization of arrays in tr1/regex ill-formed or
                    with undefined behaviour
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hstong at ca dot ibm.com

The header tr1/regex contains code which is either ill-formed or has undefined
behaviour.
Various C++ language tools choke on this file because of the code in question.

In particular, C++03 subclause 8.5 [dcl.init] does not specify the semantics of
the array initializations in question and they are ill-formed under C++11.



/usr/lib/gcc/x86_64-pc-cygwin/4.8.2/include/c++/tr1/regex:685:22: error: array
      initializer must be an initializer list
   const char* const __wb[] = "w";
                     ^
/usr/lib/gcc/x86_64-pc-cygwin/4.8.2/include/c++/tr1/regex:695:22: error: array
      initializer must be an initializer list
   const char* const __bb[] = "blank";
                     ^


VERSION INFO:
$ g++ --version
g++ (GCC) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


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

end of thread, other threads:[~2014-04-28 15:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-24 20:46 [Bug libstdc++/60958] New: Initialization of arrays in tr1/regex ill-formed or with undefined behaviour hstong at ca dot ibm.com
2014-04-25  9:36 ` [Bug libstdc++/60958] " redi at gcc dot gnu.org
2014-04-25 13:27 ` hstong at ca dot ibm.com
2014-04-25 15:42 ` redi at gcc dot gnu.org
2014-04-25 16:11 ` redi at gcc dot gnu.org
2014-04-25 16:13 ` redi at gcc dot gnu.org
2014-04-28 15:14 ` redi 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).