> Am 03.12.2011 12:47, schrieb Philipp Klaus Krause:
> > Am 03.12.2011 12:39, schrieb Maarten Brock:
> >>> Am 03.12.2011 12:26, schrieb Maarten Brock:
> >>>
> >>>> Regarding bug3440327.c,
> >>>
> >>> Do you mean bug3444293.c?
> >
> >> Yes, sorry. I copied the wrong name from the paragraph
> >> above it.
> >>>
> >>>> can the value be changed to 0 as it was in
> >>>> the bug report? Any 0 value equals the null pointer and is ok, but
> >>>> other values need to qualify their memory space on mcs51 and ds390.
> >>>
> >>> Philipp
> >
> >> Maarten
> >
> > Well, in lines 11 and 12, the pointers are set to 0. That's were the bug
> > occoured (resulting in the lower byte of s[1] not being set to zero and
> > the lower byte of s[3] being set to zero instead). To detect it in the
>
> This was meant to read s[2].
>
> > assertion we therefore need the pointers to be nonzero (and preferably,
> > to be all bytes of the pointers to be nonzero). That's why I did set
> > them to 0xffff.
> >
> > Philipp
>
> Would it be OK if Il just disable warning 88 for this test?
If you want all bytes to be non-zero, no. A generic
pointer on mcs51 is 3 bytes. I propose to use a (void
__code *) cast. This will solve the warning (used to be
an error in the past btw.) and sets the third byte to
0x80. For targets without __code keyword this is defined
empty in testfwk.h.
>
> Philipp
Maarten
|