volatile structures: Is that a bug?

2008-09-19 Thread Etienne Lorrain
Hello, On C structures, for attributes like const, it is enough to consider that each field inherit the attribute of the structure. But for the volatile attribute, is it valid to treat each field as volatile like GCC does it now? I mean: volatile struct { unsigned char a,b,c,d; } volstruct; void

Re: volatile structures: Is that a bug?

2008-09-19 Thread Andrew Haley
Etienne Lorrain wrote: On C structures, for attributes like const, it is enough to consider that each field inherit the attribute of the structure. But for the volatile attribute, is it valid to treat each field as volatile like GCC does it now? An object that has volatile-qualified type may

Re: volatile structures: Is that a bug?

2008-09-19 Thread Etienne Lorrain
On C structures, for attributes like const, it is enough to consider that each field inherit the attribute of the structure. But for the volatile attribute, is it valid to treat each field as volatile like GCC does it now? An object that has volatile-qualified type may be modified in

Re: volatile structures: Is that a bug?

2008-09-19 Thread Andrew Haley
Etienne Lorrain wrote: On C structures, for attributes like const, it is enough to consider that each field inherit the attribute of the structure. But for the volatile attribute, is it valid to treat each field as volatile like GCC does it now? An object that has volatile-qualified type may