﻿id	summary	reporter	owner	description	type	status	priority	component	version	resolution	keywords	cc
299	Unusable overload allowed, between array and pointer	mlbrooks		"{{{
    #ifndef SUPPRESS_COMP_ERR
    void f1() {
        int a[100];
        int *a;                     // dup
        a[0];                       // ambiguous
    }

    void f2() {
        int *a;
        int a[100];                 // dup
        a[0];                       // ambiguous
    }
    #endif

    int a[100];

    void f3() {
        int x = 42;
        int *a = & x;
        printf(""%d\n"", a[0]);       // ambiguous
    }

    void f4( int *a ) {
        printf(""%d\n"", a[0]);       // ambiguous
    }

    void f5( int a[100] ) {
        printf(""%d\n"", a[0]);       // ambiguous
    }

    int main() {
        int x = 42;
        f3();
        f4( & x );
        f5( & x );
        return 0;
    }
}}}

    CFA actual (with and without -DSUPPRESS_COMP_ERR): compiler rejection ""Cannot choose between 2 alternatives for a"" at all five lines commented ""ambiguous""

    GCC actual, CFA exptected (without -DSUPPRESS_COMP_ERR): compiler rejection ""conflicting types"" or ""duplicate definition"" at two lines commented ""dup""

    GCC actual, CFA exptected (with -DSUPPRESS_COMP_ERR): runs and prints ""42"" three times
"	defect	new	major	cfa-cc	1.0		overload shadow scope array decay	
