﻿id	summary	reporter	owner	description	type	status	priority	component	version	resolution	keywords	cc
269	Wrong type for generics' implicit _sizeof params on 32-bit	mlbrooks		"== Current form of the issue, remaining after partial fix in 58eb9250e:

{{{
forall( T * )
void mary( const T & ) {
	printf( ""%zu\n"", sizeof(T) );  // used to fail, because sizeof(-) always had type long unsigned int
	for ( i; sizeof(T) ) {
		if (i > 0) printf("" "");
		printf( ""%zu"", i);         // still failing, because i is always getting type long unsigned int, even when sizeof(-) is getting type size_t
	}
	printf(""\n"");
}

int main() {
	float x = 3.14;
	mary(x);
	return 0;
}
}}}

Compiling as:
{{{
cfa -Wall -Werror -m32 test.cfa
}}}

Actual: compilation error: format ‘%zu’ expects argument of type ‘size_t’, but argument 2 has type ‘long unsigned int’ at comment ""still failing""

Expected: Run with output
{{{
4
0 1 2 3
}}}

== Original form of the issue, fixed by 58eb9250e:

{{{
forall(T)
void fred( T x ) {
    printf( ""%zu\n"", sizeof(T) );
    printf( ""%zu\n"", sizeof(x) );
}
int main() {
    char c = 'x';
    fred(c);
}
}}}

Compiling as
{{{
cfa -Wall -Werror x.cfa
}}}

Expected, actual on plg2: runs and prints `1` twice.

Actual on ruby: compilation error (twice): format ‘%zu’ expects argument of type ‘size_t’, but argument 2 has type ‘long unsigned int’

(Found by Peter, whittled by Mike.)
"	defect	closed	major	cfa-cc	1.0	fixed		
