﻿id	summary	reporter	owner	description	type	status	priority	component	version	resolution	keywords	cc
300	sizeof/typeof as a variable's usage may leave this variable unused	mlbrooks		"{{{
void fred( const char & p ) {
    printf( ""%zu\n"", sizeof(p) );
}

forall( T * )
void mary( const T & p ) {
    printf( ""%zu\n"", sizeof(p) );
}

int main() {
    char x = 'a';
    fred(x);
    mary(x);
    return 0;
}
}}}

{{{
$cfa -Wall -Wextra -Werror test.cfa
}}}

Expected: run, print 1 twice
Actual: compile error: unused parameter (mangled name of) p, twice


Note that in -CFA output, the sizeof(p) expressions are rewritten as
- sizeof(const char), within fred
- _sizeof_Y1T, within mary

Also occurs with plain variables, as in tests/sizeof.cfa.

Also occurs with typeof, as in tests/typeof.cfa.
"	defect	new	minor	cfa-cc	1.0		sizeof unused	
