Article View: gnu.gcc.bug
Article #2307complaints about "volatile" out of the blue...
From: Ken Raeburn
Date: Wed, 15 Feb 1989 19:05
Date: Wed, 15 Feb 1989 19:05
45 lines
1573 bytes
1573 bytes
GCC vax 1.33, 3 patches from RMS. Optimization does not affect it.
------- Forwarded Message
From: <tmdonahu@ATHENA.MIT.EDU>
Date: Wed, 15 Feb 89 13:48:35 EST
To: raeburn@ATHENA.MIT.EDU
Subject: gcc
The problem seems to arise only when the indicies to the array are
functions. In this case, the undefined function joe() is used.
Terry
----------------------------------------------------------------------
gcc -c -O test.c
test.c: In function ultimate_rules:
test.c:17: warning: assignment of non-volatile * pointer from volatile *
----------------------------------------------------------------------
typedef struct {
unsigned int flags; /* bits for walls, inside maze */
unsigned char type; /* landmark, scroll, goal, outpost, etc. */
unsigned char team; /* number of team that owns the box */
unsigned char strength; /* strength of the scroll, outpost, etc. */
} Box;
typedef Box Map[30][30];
extern Map box;
ultimate_rules(i,j)
int i,j;
{
Box *b;
b = &box[joe(i)][joe(j)];
}
------- End Forwarded Message
Technical Details
Message-ID:
<8902151905.AA15748@PROMETHEUS.MIT.EDU>Path:
arc1-ca.pugleaf.net!utzoo!yunexus!telly!attcan!dptcdc!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ATHENA.MIT.EDU!raeburnShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!yunexus!telly!attcan!dptcdc!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ATHENA.MIT.EDU!raeburn From: raeburn@ATHENA.MIT.EDU (Ken Raeburn) Newsgroups: gnu.gcc.bug Subject: complaints about "volatile" out of the blue... Message-ID: <8902151905.AA15748@PROMETHEUS.MIT.EDU> Date: 15 Feb 89 19:05:05 GMT Article-I.D.: PROMETHE.8902151905.AA15748 Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 45