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

--- Comment #8 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #7)
> both gcc and clang warn about it, but I think it shouldn't warn and have
> sizeof "foo" in that case.

It's not in scope yet for the trailing return-type according to
https://eel.is/c++draft/basic.scope.pdecl#9 : "The locus of the implicit
declaration of a function-local predefined variable is immediately before the
function-body of its function's definition."

Reply via email to