https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64954

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |msebor at gcc dot gnu.org
      Known to fail|                            |4.9.3, 5.3.0, 6.0

--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
Although this is a corner case, it does look like rejecting is incorrect. 
(Though EDG eccp 3.10 also rejects it.)  Reconfirming with 6.0 and prior.

$ z.c && /home/msebor/build/gcc-trunk-svn/gcc/xg++
-B/home/msebor/build/gcc-trunk-svn/gcc -S -Wall -Wextra -Wpedantic ../z.c
struct A { };
int main() {
    A a;
    constexpr A b = a;
}

z.c: In function ‘int main()’:
z.c:4:21: error: the value of ‘a’ is not usable in a constant expression
     constexpr A b = a;
                     ^
z.c:3:7: note: ‘a’ was not declared ‘constexpr’
     A a;
       ^

Reply via email to