Changeset ee858bf for tests/init1.cfa


Ignore:
Timestamp:
Oct 9, 2020, 11:22:58 PM (12 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast-unique-expr
Children:
a33704d
Parents:
04423b5
Message:

add 0p test for function pointers, and seperate valid from error output

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/init1.cfa

    r04423b5 ree858bf  
    99// Author           : Michael Brooks
    1010// Created On       : Thu Jul 16 22:00:00 2020
    11 // Last Modified By : Michael Brooks
    12 // Last Modified On : Thu Jul 16 22:00:00 2020
    13 // Update Count     : 1
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Fri Oct  9 23:11:02 2020
     13// Update Count     : 5
    1414//
    1515
     
    4141    const float * cpx2 = cpx;
    4242
     43    int (* fp)( int ) = 0p;
     44    fp = 0p;
     45
    4346    //
    4447    // unsound initializations
    4548    //
    4649
     50    #ifdef ERR1
    4751    // mismatched referenced type
    4852    int & ry = rx;
     
    5256    float & ry2 = crx;
    5357    float * py2 = cpx;
     58    #endif // ERR1
    5459}
    5560
     
    9095//
    9196
     97#ifdef ERR1
    9298int & f_ry() {
    9399    float & rx = *0p;
     
    119125    return s;               // mismatched referenced type
    120126}
     127#endif // ERR1
     128
     129int main() {
     130    #pragma message( "Compiled" )                       // force non-empty .expect file
     131}
Note: See TracChangeset for help on using the changeset viewer.