This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/59123] New: [c++11] can't forward-declare an object later defined constexpr
- From: "eric.niebler at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 14 Nov 2013 00:33:00 +0000
- Subject: [Bug c++/59123] New: [c++11] can't forward-declare an object later defined constexpr
- Auto-submitted: auto-generated
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 {};