On Sat, Feb 29, 2020 at 09:50:00AM +0000, Uecker, Martin wrote: > One could also simply remove the error in varasm.c. This > would preserve the optimization. As a side effect, this > would allow register without __asm__ at file scope, but > there do not seem to be any disadvantages. (register > at file scope is already diagnosed by the C FE when > using --pedantic).
First of all, such a change wouldn't be appropriate for backports, and IMHO makes only sense if we actually start optimizing based on that (assuming the address of the var can't be taken in alias analysis etc.). Jakub