Does dereferencing a volatile pointer produce a volatile element?

Jeffrey Walton noloader@gmail.com
Mon Feb 15 16:37:00 GMT 2016


Hi Everyone,

As an example:

    int a[10];
    volatile int* b = a;

    for(unsigned i=0; i<10; i++)
        *b++ = 0;

When the dereference occurs through b, does it produce a volatile element?

Thanks in advance.



More information about the Gcc-help mailing list