raeburn@ATHENA.MIT.EDU (Ken Raeburn) (02/16/89)
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