[Bug c++/94685] Misleading error: array must be initialized with a brace-enclosed initializer

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Apr 21 09:47:20 GMT 2020


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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This diagnostic seems wrong too:

  using A = int[1];
  A a1{A{}};

ntconsarr.cc:1:26: error: taking address of temporary array
    1 |   using A = int[1]; A a1{A{}};
      |                          ^~~


More information about the Gcc-bugs mailing list