...with the semantics that such accesses should work as-if the underlying
object
had a volatile-qualified type.

Some GCC users (notably the Linux kernel) already depend on this behaviour;
however since GCC never actually supported it their expectations keep breaking
(see for example PR21568, PR22278, PR29753).

I am not requesting that GCC implement any other semantics that people
expect from volatile; only that GCC treat


int x;
... *(volatile int *)&x ...;


as if it read


volatile int x;
... x ...;


===

Please consider,


Segher


-- 
           Summary: adopt accesses through a volatile-casted pointer as a
                    GNU C extension
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: segher at kernel dot crashing dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33053

Reply via email to