public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/59123] New: [c++11] can't forward-declare an object later defined constexpr
@ 2013-11-14  0:33 eric.niebler at gmail dot com
  2013-11-17 10:08 ` [Bug c++/59123] " paolo.carlini at oracle dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: eric.niebler at gmail dot com @ 2013-11-14  0:33 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 59123
           Summary: [c++11] can't forward-declare an object later defined
                    constexpr
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: eric.niebler at gmail dot com

Clang accepts the following. I think it's legal. g++ 4.8.1 rejects it:

// Fwd-declarations
struct S;
extern const S s;

// (... later) definitions
struct S {};
constexpr S s {};


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

end of thread, other threads:[~2013-11-17 19:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-14  0:33 [Bug c++/59123] New: [c++11] can't forward-declare an object later defined constexpr eric.niebler at gmail dot com
2013-11-17 10:08 ` [Bug c++/59123] " paolo.carlini at oracle dot com
2013-11-17 19:22 ` paolo at gcc dot gnu.org
2013-11-17 19:23 ` paolo.carlini at oracle dot com

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