Ignore:
Timestamp:
Jan 8, 2019, 11:31:21 AM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer
Children:
08222c7, 274da98
Parents:
84b4d607 (diff), d5b2ac8 (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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/genericUnion.cfa

    r84b4d607 r25cdca5  
     1//
     2// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
     3//
     4// The contents of this file are covered under the licence agreement in the
     5// file "LICENCE" distributed with Cforall.
     6//
     7// genericUnion.cfa --
     8//
     9// Author           : Peter A. Buhr
     10// Created On       : Tue Dec 25 14:42:46 2018
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Tue Dec 25 14:46:33 2018
     13// Update Count     : 2
     14//
     15
    116#include <limits.hfa>
    217
     
    419union ByteView {
    520        T val;
    6         char bytes[(sizeof(int))]; // want to change to sizeof(T)
     21        char bytes[(sizeof(int))];                                                      // want to change to sizeof(T)
    722};
    823
    924forall(otype T)
    1025void print(ByteView(T) x) {
    11         for (int i = 0; i < sizeof(int); i++) { // want to change to sizeof(T)
     26        for (int i = 0; i < sizeof(int); i++) {                         // want to change to sizeof(T)
    1227                printf("%02x", x.bytes[i] & 0xff);
    1328        }
     
    2944        f(i, -1);
    3045}
     46
     47// Local Variables: //
     48// tab-width: 4 //
     49// compile-command: "cfa genericUnion.cfa" //
     50// End: //
Note: See TracChangeset for help on using the changeset viewer.