public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/64977] New: GCC incorrectly rejects constexpr variable definition.
@ 2015-02-08 23:20 ytj000 at gmail dot com
2015-03-27 16:47 ` [Bug c++/64977] " paolo.carlini at oracle dot com
0 siblings, 1 reply; 2+ messages in thread
From: ytj000 at gmail dot com @ 2015-02-08 23:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64977
Bug ID: 64977
Summary: GCC incorrectly rejects constexpr variable definition.
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ytj000 at gmail dot com
struct A {
constexpr operator int() const { return 0; }
};
int main() {
A a{};
constexpr int b = a; // ok
[a]() { constexpr int b = a; }; // ok
// error: the value of 'a' is not usable in a constant expression
[&a]() { constexpr int b = a; };
}
GCC doesn't compile, clang compiles. (with -std=c++11)
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/64977] GCC incorrectly rejects constexpr variable definition.
2015-02-08 23:20 [Bug c++/64977] New: GCC incorrectly rejects constexpr variable definition ytj000 at gmail dot com
@ 2015-03-27 16:47 ` paolo.carlini at oracle dot com
0 siblings, 0 replies; 2+ messages in thread
From: paolo.carlini at oracle dot com @ 2015-03-27 16:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64977
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-03-27
Blocks| |55004
Ever confirmed|0 |1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-03-27 16:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-08 23:20 [Bug c++/64977] New: GCC incorrectly rejects constexpr variable definition ytj000 at gmail dot com
2015-03-27 16:47 ` [Bug c++/64977] " 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).