https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107360
--- Comment #5 from Martin Uecker ---
Yes. After reconsidering this, this is not related to the other bugs mentioned
above. I think your first example needs to be invalid, because the derived
return type then depends on a variable inside the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107360
--- Comment #4 from Alexey Izbyshev ---
(In reply to Martin Uecker from comment #3)
> I think there there are cases were variably modified
> return types are allowed in ISO C:
>
> void f(int n, double (*(bar(void)))[n])
> {
> double
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107360
Martin Uecker changed:
What|Removed |Added
CC||muecker at gwdg dot de
--- Comment #3
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107360
--- Comment #2 from Alexey Izbyshev ---
(In reply to Andrew Pinski from comment #1)
> Maybe this should be invalid code ...
Yes, I think it should be invalid. VLAs are not allowed in function return
types in C. VLAs in C++ are a GCC extension,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107360
Andrew Pinski changed:
What|Removed |Added
Keywords|ice-on-valid-code |
--- Comment #1 from Andrew Pinski