https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70301
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed|2016-03-19 00:00:00 |2021-9-28 --- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Starting with GCC 9 we get: <source>: In function 'void g()': <source>:8:24: error: taking address of rvalue [-fpermissive] 8 | int *q = &f ().a [0]; | ~~~~~~~~~^ Nothing about the other case.