﻿id	summary	reporter	owner	description	type	status	priority	component	version	resolution	keywords	cc
257	Pointer arithmetic silently adds narrowing conversions	mlbrooks		"{{{
int main() {
    int *a, *b, x;
    b = a + 3.5;
    x = a[3.5];
    x = (3.5)[a];
}
}}}

All three seem to be asking for pointer + double, which is nonsense.

CFA, actual:  Compiles successfully.  The 3.5 is rounded down to the integral 3.  The generated code includes the lines:
{{{
((void)(_X1bPi_2=(_X1aPi_2+((signed long int )3.5))));
((void)(_X1xi_2=_X1aPi_2[((signed long int )3.5)]));
((void)(_X1xi_2=((signed long int )3.5)[_X1aPi_2]));
}}}

GCC, actual:  Compilation errors on all three: ""invalid operands to binary + (have ‘int *’ and ‘double’)"" or ""array subscript is not an integer"""	defect	new	minor	cfa-cc	1.0			
