This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ICE in change_address at emit_rtl.c


> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]