| | 1 | == Current form of the issue, remaining after partial fix in 58eb9250e: |
| | 2 | |
| | 3 | {{{ |
| | 4 | forall( T * ) |
| | 5 | void mary( const T & ) { |
| | 6 | printf( "%zu\n", sizeof(T) ); // used to fail, because sizeof(-) always had type long unsigned int |
| | 7 | for ( i; sizeof(T) ) { |
| | 8 | if (i > 0) printf(" "); |
| | 9 | printf( "%zu", i); // still failing, because i is always getting type long unsigned int, even when sizeof(-) is getting type size_t |
| | 10 | } |
| | 11 | printf("\n"); |
| | 12 | } |
| | 13 | |
| | 14 | int main() { |
| | 15 | float x = 3.14; |
| | 16 | mary(x); |
| | 17 | return 0; |
| | 18 | } |
| | 19 | }}} |
| | 20 | |
| | 21 | Compiling as: |
| | 22 | {{{ |
| | 23 | cfa -Wall -Werror -m32 test.cfa |
| | 24 | }}} |
| | 25 | |
| | 26 | Actual: compilation error: format ‘%zu’ expects argument of type ‘size_t’, but argument 2 has type ‘long unsigned int’ at comment "still failing" |
| | 27 | |
| | 28 | Expected: Run with output |
| | 29 | {{{ |
| | 30 | 4 |
| | 31 | 0 1 2 3 |
| | 32 | }}} |
| | 33 | |
| | 34 | == Original form of the issue, fixed by 58eb9250e: |
| | 35 | |