source: doc/rob_thesis/examples/conclusions/except.c @ 0895cba

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change on this file since 0895cba was f92aa32, checked in by Rob Schluntz <rschlunt@…>, 8 years ago

thesis conclusions and editting pass

  • Property mode set to 100644
File size: 318 bytes
Line 
1#include <stdio.h>
2typedef struct S {
3  int x;
4} S;
5
6void _dtor_S(S * s);
7//  {
8//   printf("called destructor!\n");
9// }
10
11void _ctor_S(struct S *s);
12//  {
13//   s->x = 123;
14// }
15
16int main() {
17  struct S _tmp3;
18  __attribute__((cleanup(_dtor_S))) struct S _tmp2 = (_ctor_S(&_tmp2), _tmp2);
19  printf("%d\n", _tmp2.x);
20}
Note: See TracBrowser for help on using the repository browser.