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


Hi,

I just stepped on some strange piece of code in subj:

...
73 extern int nexectype;        /* number of elements in execsw */
74 extern struct execsw execsw[];
75 extern kmutex_t execsw_lock;
...
159 struct execsw {
160     char    *exec_magic;
161     int     exec_magoff;
162     int     exec_maglen;

...


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 ?

It works with e.g. gcc-2.95.

I have a firm belief that GCC cannot be used as a standard conformance
test tool. It is notoriously known for complying to its own standard.

I bet you know that as good as me !

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

Reply via email to