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

Xi Ruoyao <xry111 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |xry111 at gcc dot gnu.org

--- Comment #3 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #2)
> https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Global-Register-Variables.html
> 
> Do not use type qualifiers such as const and volatile, as the outcome may be
> contrary to expectations. In particular, using the volatile qualifier does
> not fully prevent the compiler from optimizing accesses to the register.
> 
> 
> In fact it is DOCUMENTED this way.

So should we just warn about a cv-qualified global register variable or even
reject that?

Reply via email to