ICE in change_address at emit_rtl.c

mike stump mrs@windriver.com
Mon Nov 26 12:54:00 GMT 2001


> Date: Sat, 24 Nov 2001 23:05:30 -0800
> From: Zack Weinberg <zack@codesourcery.com>
> To: mike stump <mrs@windriver.com>

> int main(argc, argv)
>    int argc;
>    string argv[];
> {
>    int i;
>    for(i=1; i<argc; i++)
>     puts(argv[i]);
>    return 0;
> }

> $ gcc -S test.c
> test.c: In function `main':
> test.c:3: parse error before `string'
> test.c:7: subscripted value is neither array nor pointer

> Here, we have no clue what the type of an element of argv is, but we
> ought to be able to call it "array of <unknown type>" instead of
> just "<unknown type>".

unknown type is fine, this is a trivial little bug that should be able
to be fixed with 2 lines of change.  It might be marginally better
with EMN[], but, the cost is once EMN is inside of `things' (such as
[]), the code that has to check stuff as you rip apart stuff
increases.  And without the checks in place before you begin, you
increase the faulting before you improve the diagnostics, which, isn't
an improvement.



More information about the Gcc mailing list