Hello all.
As suggested, I've reported this as a feature request, Maarten. Although I must
say I anticipated it to be either i) a bug or ii) me missing the blatantly
obvious
I'll shamelessly highjack this thread quickly to say many thanks for all the
efforts, chaps. Well appreciated
Cheers - regards
geo
On 12 Oct 2010, at 20:45, Maarten Brock wrote:
> Hi George,
>
> Please report this as a feature request in our tracker
> system.
>
> Maarten
>
>> Hi all.
>>
>> I'm trying to port some pre-existing code to sdcc for 8051. In some files,
>> the original code uses gcc-style void * arithmetic, similar to this:
>>
>> static unsigned short foo[15];
>>
>> void funct() {
>> void * ptr;
>>
>> ptr = foo; /* ptr is X:0xe01a */
>>
>> /* do something */
>>
>> ptr = (void *)foo + 1; /* ptr is still X:0xe01a */
>> }
>>
>> Please correct me if I'm wrong but I would expect this code to cause warning
>> 178: size of void is zero. Correct?
>> sdcc doesn't produce a warning, while gcc -Wpointer-arith does.
>>
>> Needless to say, the code does not achieve what the developer originally
>> intended, which makes things hard for me to debug. So my question here is,
>> is there a way to turn on a warning for this scenario?
>>
>> Thanks for any tips all.
>> Regards
>> geo
>>
>>
>> ------------------------------------------------------------------------------
>> Beautiful is writing same markup. Internet Explorer 9 supports
>> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
>> Spend less time writing and rewriting code and more time creating great
>> experiences on the web. Be a part of the beta today.
>> http://p.sf.net/sfu/beautyoftheweb
>> _______________________________________________
>> Sdcc-user mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/sdcc-user
>>
>
>
>
> ------------------------------------------------------------------------------
> Beautiful is writing same markup. Internet Explorer 9 supports
> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
> Spend less time writing and rewriting code and more time creating great
> experiences on the web. Be a part of the beta today.
> http://p.sf.net/sfu/beautyoftheweb
> _______________________________________________
> Sdcc-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sdcc-user
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user