On Mon, Oct 6, 2008 at 12:00 PM, via RT Andy Dougherty
<[EMAIL PROTECTED]> wrote:
> # New Ticket Created by  Andy Dougherty
> # Please include the string:  [perl #59658]
> # in the subject line of all future correspondence about this issue.
> # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=59658 >
>
>
> Trying to compile today's parrot on:
>    SunOS xxx 5.8 Generic_117350-02 sun4u sparc SUNW,Ultra-5_10
> with Sun's compiler:
>    cc: WorkShop Compilers 4.2 30 Oct 1996 C 4.2
>
> it failed with the following errors:
>
> src/pmc/float.c
>    
> "/home/doughera/src/parrot/parrot-cc/tools/build/../../lib/Parrot/Pmc2c/PCCMETHOD.pm",
>  line 465: warning: statement not reached
>    [ repeated 17 times ]
>    "./src/pmc/float.c", line 3340: non-constant initializer: op "U*"
>    "./src/pmc/float.c", line 3341: non-constant initializer: op "U*"
>    "./src/pmc/float.c", line 3342: non-constant initializer: op "U*"
>    [ 21 more similar errors ]
>    "./src/pmc/float.c", line 3454: cannot recover from previous errors
>
> Looking at src/pmc/float.c, the first lines in question are:
>
>    const  multi_func_list _temp_multi_func_list[] = {
>        { CONST_STRING(interp, "is_equal"),    /* line 3340 */
>          CONST_STRING(interp, "IJPP"),        /* line 3341 */
>          CONST_STRING(interp, "Float,Float"), /* line 3342 */
>          (funcptr_t) Parrot_Float_multi_is_equal_Float },
>
> which ultimately expand to:
>
>    const  multi_func_list _temp_multi_func_list[] = {
>        {  ( interp ) -> const_cstring_table [ 515 ],
>           ( interp ) -> const_cstring_table [ 84 ],
>           ( interp ) -> const_cstring_table [ 639 ],
>          (funcptr_t) Parrot_Float_multi_is_equal_Float },
>
> which indeed are non-constant initializers.  GNU cc accepts this, as do
> more modern compilers from Sun (such as version 5.9).  I'm guessing it's
> a C99 thing, but I don't actually know.
>
> What to do about it?  I suppose I could go in and rewrite those statements
> (and similar ones that crop up in other PMCs)  but I certainly won't
> have any time to do that any time soon.
>
> Should anyone care?  It's certainly an old compiler, but it's the only
> Sun compiler I have available on SPARC, and SPARC has often been a very
> helpful platform for debugging alignment and endian issues in parrot.
>
msvc 9.0 (the most recent version) also complains:

  .\src\pmc\float.c(3340) : warning C4204: nonstandard extension used
: non-constant aggregate initializer

there are now hundreds of these warnings in that build. we do have
warnings ratcheted up pretty high, but i don't think it's worth
relaxing them for this construct unless it's very difficult to change
the code generator--i assume this is generated code, since it's in so
many pmc .c files. i may get a chance to investigate further this
evening, if somebody hasn't beaten me to it.

~jerry

Reply via email to