obstack access function
[libfirm] / testprograms / array-stack_example.c
index 7153543..af8eb0e 100644 (file)
@@ -1,9 +1,9 @@
  /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
-** All rights reserved.
-**
-** Authors: Goetz Lindenmaier
-**
-** testprogram.
+* All rights reserved.
+*
+* Authors: Goetz Lindenmaier
+*
+* testprogram.
 */
 
 # include <string.h>
 # include "irdump.h"
 # include "firm.h"
 
-/**  This example describes representation of stack allocated variables of
-***  imperative programs.
-***  It constructs the IR for the following program:
-***
-***
-***  main(): int
-***    int a[10];
-***
-***    return (a[3]);
-***  end;
-***
-***  The array is placed on the stack, i.e., a pointer to the array
-***  is obtained by selecting the entity "a" from the stack.  The variables
-***  on the stack are considered to be entities of the method, as locals
-***  of a method are only visible within the method.  (An alternative to
-***  make the method owner of the stack variables is to give the ownership
-***  to the class representing the C-file.  This would extend the visibility
-***  of the locals, though.)
+/**
+*  imperative programs.
+*  It constructs the IR for the following program:
+*
+*
+*  main(): int
+*    int a[10];
+*
+*    return (a[3]);
+*  end;
+*
+*  The array is placed on the stack, i.e., a pointer to the array
+*  is obtained by selecting the entity "a" from the stack.  The variables
+*  on the stack are considered to be entities of the method, as locals
+*  of a method are only visible within the method.  (An alternative to
+*  make the method owner of the stack variables is to give the ownership
+*  to the class representing the C-file.  This would extend the visibility
+*  of the locals, though.)
 **/
 
 
@@ -59,7 +59,7 @@ main(void)
   ir_graph       *main_irg;
   ir_node        *array_ptr, *c3, *elt, *val, *x;
 
-  init_firm ();
+  init_firm (NULL);
 
   printf("\nCreating an IR graph: ARRAY-STACK_EXAMPLE...\n");