This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/59938] New: [C++11] Bogus "... is not a constant expression"


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

            Bug ID: 59938
           Summary: [C++11] Bogus "... is not a constant expression"
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ppluzhnikov at google dot com

Test:

struct Data { const char* const& name; };
constexpr Data d = { "" };


Using g++ (GCC) 4.9.0 20140122 (experimental):

g++ -c -std=c++11 t.cc
t.cc:2:25: error: 'const Data{(* & _ZGRL1d0)}' is not a constant expression
 constexpr Data d = { "" };
                         ^


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]