Changes between Initial Version and Version 1 of Ticket #269


Ignore:
Timestamp:
Jan 6, 2025, 12:44:23 PM (9 months ago)
Author:
mlbrooks
Comment:

Revise, given partial fix

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #269 – Description

    initial v1  
     1== Current form of the issue, remaining after partial fix in 58eb9250e:
     2
     3{{{
     4forall( T * )
     5void 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
     14int main() {
     15        float x = 3.14;
     16        mary(x);
     17        return 0;
     18}
     19}}}
     20
     21Compiling as:
     22{{{
     23cfa -Wall -Werror -m32 test.cfa
     24}}}
     25
     26Actual: compilation error: format ‘%zu’ expects argument of type ‘size_t’, but argument 2 has type ‘long unsigned int’ at comment "still failing"
     27
     28Expected: Run with output
     29{{{
     304
     310 1 2 3
     32}}}
     33
     34== Original form of the issue, fixed by 58eb9250e:
     35
    136{{{
    237forall(T)