Opened 19 months ago

#269 new defect

Wrong type for generics' implicit _sizeof params on 32-bit

Reported by: mlbrooks Owned by:
Priority: major Component: cfa-cc
Version: 1.0 Keywords:


void fred( T x ) {
    printf( "%zu\n", sizeof(T) );
    printf( "%zu\n", sizeof(x) );
int main() {
    char c = 'x';

Compiling as

cfa -Wall -Werror

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

Change History (0)

Note: See TracTickets for help on using tickets.