https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97708
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|FIXED |--- Status|RESOLVED |NEW --- Comment #26 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #25) > Even if we wanted to do something about it (which I disagree with, e.g. > given that the implementation matches the documentation), you run into the > problem that even GIMPLE nor RTL differentiates between: > void > foo (void) > { > register int a __asm ("eax") = 1; > __asm ("# %0 " : : "c" (a+0)); > __asm ("# %0 " : : "c" (a)); > } > And "c" (a+0) unquestionably must be valid, it is just an expression that > happens to be equal to a value of local register variable. So it would need to be diagnosed in the FE (only), making a + 0 valid and a not. Eh.