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

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
void foo ();
template <typename>
void bar ()
{
  decltype(auto) v = ({ foo (); 3; });
}

doesn't need -O1 nor -g to trigger the error, and can be reproduced with
-std=c++14 and higher.  Still started with that commit, before that it has been
accepted.
strip_typedefs_expr errors on STATEMENT_LIST, which is called by the
canonicalize_type_argument call which has been added in that change.
I think decltype(auto) deduction shouldn't require a constant expression in the
initializer.

Reply via email to