This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Does dereferencing a volatile pointer produce a volatile element?
- From: Jeffrey Walton <noloader at gmail dot com>
- To: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Mon, 15 Feb 2016 11:37:13 -0500
- Subject: Does dereferencing a volatile pointer produce a volatile element?
- Authentication-results: sourceware.org; auth=none
- Reply-to: noloader at gmail dot com
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.