Ignore:
Timestamp:
Dec 26, 2018, 7:21:08 AM (3 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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:
0689cd9, 25cdca5
Parents:
f498c51
Message:

formatting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/genericUnion.cfa

    rf498c51 rd5b2ac8  
     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.