Changeset dd51906 for src/examples/sum.c


Ignore:
Timestamp:
Jun 7, 2016, 1:47:52 PM (8 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
ac78e25
Parents:
d5f1cfc
Message:

automake change gnu back to foreign (do not know why it changed), add := and & (reference) to lexer/parser

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/examples/sum.c

    rd5f1cfc rdd51906  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // sum.c --
     7// sum.c -- test resolvers ability to deal with many variables with the same name and to use the minimum number of casts
     8//    necessary to disambiguate overloaded variable names.
    89//
    910// Author           : Peter A. Buhr
    1011// Created On       : Wed May 27 17:56:53 2015
    1112// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon May  2 15:07:57 2016
    13 // Update Count     : 198
     13// Last Modified On : Thu May 26 09:25:42 2016
     14// Update Count     : 201
    1415//
    1516
     
    7576
    7677        struct S { int i, j; } 0 = { 0, 0 }, 1 = { 1, 1 };
    77         S ?+?( S t1, S t2 ) { S s = { t1.i + t2.i, t1.j + t2.j }; return s; }
     78        S ?+?( S t1, S t2 ) { return (S){ t1.i + t2.i, t1.j + t2.j }; }
    7879        S ?+=?( S *t1, S t2 ) { *t1 = *t1 + t2; return *t1; }
    7980        S ++?( S *t ) { *t += 1; return *t; }
Note: See TracChangeset for help on using the changeset viewer.