Re: patch for VxWorks / Wind River Diab Compiler support

Manfred Kogler <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <CAMfrEkiiqbwfvpMEYds+e_cxYeYk-=jtTyi5E3Tt0Q1OucT0Ow@mail.gmail.com>
Hi again,

I had a closer look and now realize that _buf is a member of struct
cairo_image_span_renderer_t and on that structure operator sizeof() is
called. So of course the sizeof() topic is an issue.
However, as just noted, we used the pointer version (uint8_t *_buf) for
about one your now without any known issues... we were lucky  :-)

Anyway, to be standard compliant, an array declaration of length 0 shall
not be used:
    => ISO 9899:2011 6.7.6.2: If the expression is a constant expression,
it shall have a value greater than zero.

How about standard-compliance in cairo code in general?

Best regards,
Fred



On Wed, Feb 19, 2014 at 6:27 PM, Manfred Kogler <[email protected]>wrote:

> Hi Bill,
>
> ad (4)
>
> Actually, we've used that approach since more than a year and didn't run
> into a problem. However, I just retested and it seems due to a Diab
> compiler update this compile error is gone, so it is not an issue anymore
> for us which declaration is used. Besides, _buf is used only locally and
> not extensively, there is no sizeof() operator used on it.
>
> Best regards,
> Fred
>
>
>
> On Tue, Feb 18, 2014 at 5:53 PM, Bill Spitzak <[email protected]> wrote:
>
>> On 02/18/2014 06:51 AM, Manfred Kogler wrote:
>>
>>> (4) error: array declarations of len 0 are not allowed -> replaced with
>>> pointer to array-elem
>>>      see file cairo-image-compositor.c:
>>>          uint8_t _buf[0];
>>>              ->
>>>          uint8_t *_buf;
>>>
>>
>> That certainly will not work. Using [1] is common but requires fixing all
>> the uses of sizeof().
>>
>>
>> --
>> cairo mailing list
>> [email protected]
>> http://lists.cairographics.org/mailman/listinfo/cairo
>>
>
>

-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.