is 980223.c wrong?
Richard Henderson
rth@redhat.com
Fri Sep 14 14:31:00 GMT 2001
On Fri, Sep 14, 2001 at 02:47:01PM -0400, Aldy Hernandez wrote:
> i'm having doubts about 980223.c:
>
> int nil;
> object cons1[2] = { {(long) &nil, 0}, {(long) &nil, 0} };
> object cons2[2] = { {(long) &cons1, 64}, {(long) &nil, 0} };
>
> if sizeof(long) != sizeof(int *), the initializer is not a constant and
> gcc barfs.
Yes, that's wrong. I can't find where this bug was first reported,
so I can't determine what the original bug was (other than it came
from emacs of course).
I suspect that you can change the "long" object member to "char*"
without affecting the test case overmuch. Plus it'll now work for
your odd mips combinations.
r~
More information about the Gcc
mailing list