Path: utzoo!utgpu!watmath!uunet!cs.utexas.edu!usc!orion.cf.uci.edu!uci-ics!rfg From: rfg@ics.uci.edu (Ronald Guilmette) Newsgroups: gnu.gcc.bug Subject: Re: GCC bug concerning volatile Message-ID: <1989Sep21.190912.8227@paris.ics.uci.edu> Date: 21 Sep 89 19:09:12 GMT References: <8909201748.AA10157@xuucp.ch.apollo.com> Sender: news@paris.ics.uci.edu (Network News) Reply-To: Ronald Guilmette Distribution: gnu Organization: University of California, Irvine - Dept of ICS Lines: 22 In article <8909201748.AA10157@xuucp.ch.apollo.com> mike@APOLLO.COM writes: >The following simple C program shows a bug in gcc version 1.35 code generation : > > volatile > struct foo { > char a, b, c; > }; ... >Since the structure is marked as volatile... I'm not 100% sure, but I believe that this is *not* a bug. The way in which volatile is used in the example above causes it to apply to nothing. Specifically, it does *not* apply to the "struct type" itself. If however you had said something like: volatile struct foo { char a,b,c; } foo_var; then I believe that the volatile would have applied to the variable called foo_var (and nothing else). // rfg