Joerg Schilling wrote:
Cyril Plisko <[EMAIL PROTECTED]> wrote:


Compiler chokes on line 74 - execsw[] defined with type specified
_later_ in the file. I was always sure that one must define the type
_before_ declaring variable of that type. So what is the story here ?


Looks like a bug in the compiler.


So, you say it is legal syntax ?


What do you get from the compiler when you write:

extern int test[];

Jörg


zulu:/tmp> cat ar.c
extern int test[];

void empty(void)
{
        test[1] = 0;
}
zulu:/tmp> /opt/polaris/bin/powerpc-solaris2-gcc -c -Wall ar.c
zulu:/tmp>


And another test

zulu:/tmp> cat ar2.c
extern struct foo test[];

struct foo {
        int     i;
        char    b;
};

void empty(void)
{
        test[1].i = 0;
}
zulu:/tmp> /opt/polaris/bin/powerpc-solaris2-gcc -c -Wall ar2.c
ar2.c:1: error: array type has incomplete element type
zulu:/tmp>

_______________________________________________
opensolaris-code mailing list
[email protected]
https://opensolaris.org:444/mailman/listinfo/opensolaris-code

Reply via email to