This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: is 980223.c wrong?


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]