replaced variable args macros by functions to make it c89 compatible
[libfirm] / ir / ana / irscc.c
index af8cc61..5bd56b2 100644 (file)
@@ -1,14 +1,15 @@
-/* Copyright (C) 2002 by Universitaet Karlsruhe
-* All rights reserved.
-*
-* Authors:  Goetz Lindenmaier
-*
-* irscc.c  Computing the strongly connected regions and building
-* backedge/loop datastructures.
-*
-*/
-
-/* $Id$ */
+/*
+ * Project:     libFIRM
+ * File name:   ir/ana/irscc.c
+ * Purpose:     Compute the strongly connected regions and build
+ *              backedge/loop datastructures.
+ * Author:      Goetz Lindenmaier
+ * Modified by:
+ * Created:     7.2002
+ * CVS-ID:      $Id$
+ * Copyright:   (c) 2002-2003 Universität Karlsruhe
+ * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
+ */
 
 #include <string.h>
 
@@ -301,9 +302,11 @@ ir_loop *get_loop_son (ir_loop *loop, int pos) {
 
 static INLINE void
 add_loop_son(ir_loop *loop, ir_loop *son) {
+  loop_element lson;
+  lson.son = son;
   assert(loop && loop->kind == k_ir_loop);
   assert(get_kind(son) == k_ir_loop);
-  ARR_APP1 (loop_element, loop->children, (loop_element) son);
+  ARR_APP1 (loop_element, loop->children, lson);
   loop -> n_sons++;
 }
 
@@ -338,9 +341,11 @@ ir_node *get_loop_node (ir_loop *loop, int pos) {
 
 static INLINE void
 add_loop_node(ir_loop *loop, ir_node *n) {
+  loop_element ln;
+  ln.node=n;
   assert(loop && loop->kind == k_ir_loop);
   assert(get_kind(n) == k_ir_node);
-  ARR_APP1 (loop_element, loop->children, (loop_element) n);
+  ARR_APP1 (loop_element, loop->children, ln);
   loop->n_nodes++;
 }