source: src/examples/gc_no_raii/test/badlll.c@ f1e42c1

ADT aaron-thesis arm-eh ast-experimental cleanup-dtors ctor deferred_resn demangler enum forall-pointer-decay gc_noraii jacob/cs343-translation jenkins-sandbox memory new-ast new-ast-unique-expr new-env no_list persistent-indexer pthread-emulation qualifiedEnum resolv-new with_gc
Last change on this file since f1e42c1 was f1e42c1, checked in by Thierry Delisle <tdelisle@…>, 10 years ago

added some basic tests and modified compilation to support them

  • Property mode set to 100644
File size: 284 bytes
Line 
1#include "gc.h"
2
3struct List_t
4{
5 gcpointer(List_t) next;
6 int val;
7};
8
9typedef gcpointer(List_t) LLL;
10
11#define MAX (1024 * 1024)
12
13LLL buildLLL(int sz)
14{
15 int i;
16 LLL ll0, lll, llc;
17 ctor(&ll0);
18 ctor(&lll);
19 ctor(&llc);
20
21 ll0 = gcmalloc();
22 ll0->val = 0;
23 lll = ll0;
24
25 return ll0;
26}
Note: See TracBrowser for help on using the repository browser.