Article View: gnu.gcc.bug
Article #612Re: GCC bug concerning volatile
From: Ronald Guilmette
Date: Thu, 21 Sep 1989 19:09
Date: Thu, 21 Sep 1989 19:09
22 lines
1244 bytes
1244 bytes
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
Technical Details
Message-ID:
<1989Sep21.190912.8227@paris.ics.uci.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!cs.utexas.edu!usc!orion.cf.uci.edu!uci-ics!rfgReferences:
<8909201748.AA10157@xuucp.ch.apollo.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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 <rfg@ics.uci.edu> Distribution: gnu Organization: University of California, Irvine - Dept of ICS Lines: 22