Changeset ad47ec4 for tests


Ignore:
Timestamp:
Aug 29, 2024, 2:38:39 PM (17 months ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
9bb6c5f
Parents:
960665c (diff), b965774 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tests/.expect/opt-params.txt

    r960665c rad47ec4  
    1 opt-params.cfa:12:1 error: Initializer on type declaration i: int
    2   with initializer  maybe constructed? 1
    3 
    4 opt-params.cfa:13:1 error: Initializer on type declaration int
    5   with initializer  maybe constructed? 1
    6 
    7 opt-params.cfa:14:1 error: Initializer on type declaration int
    8   with initializer  maybe constructed? 1
    9 
    10 opt-params.cfa:15:1 error: Initializer on type declaration int
    11   with initializer  maybe constructed? 1
    12 
     1opt-params.cfa:13:1 error: default initialization for parameter i is unsupport for a function-pointer declaration.
     2opt-params.cfa:13:1 error: default initialization for parameter j is unsupport for a function-pointer declaration.
     3opt-params.cfa:14:1 error: default initialization for parameter anonymous is unsupport for a function-pointer declaration.
     4opt-params.cfa:15:1 error: default initialization for parameter anonymous is unsupport for a function-pointer declaration.
     5opt-params.cfa:16:1 error: default initialization for parameter anonymous is unsupport for a function-pointer declaration.
     6opt-params.cfa:17:1 error: default initialization for parameter i is unsupport for a function-pointer declaration.
     7opt-params.cfa:18:1 error: default initialization for parameter i is unsupport for a function-pointer declaration.
  • tests/opt-params.cfa

    r960665c rad47ec4  
    99// This is a slightly weird way to do it, but it let's us try all the cases
    1010// before any of the errors cause compilation to stop.
     11
    1112void bad_cases(
    12         int (*fee)( int i = 10 ),
    13         int (*fie)( int = 10 ),
    14         void feo( int (*p)( int = 10 ) ),
    15         void fum( int (*)( int = 10 ) )
     13        int (*f1)( int i = 10, int j = 5 ),
     14        int (*f2)( int = 10 ),
     15        void f3( int (*p)( int = 10 ) ),
     16        void f4( int (*)( int = 10 ) ),
     17        void f5( int (*p)( int i = 10 ) ),
     18        void f6( int (*)( int i = 10 ) )
    1619);
     20
Note: See TracChangeset for help on using the changeset viewer.