tree.h (build): Remove prototype.
authorRichard Guenther <rguenther@suse.de>
Fri, 2 Dec 2005 17:11:53 +0000 (17:11 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 2 Dec 2005 17:11:53 +0000 (17:11 +0000)
2005-12-02  Richard Guenther  <rguenther@suse.de>

        * tree.h (build): Remove prototype.
        (build, _buildN1, _buildN2, _buildC1, _buildC2): Remove macros.
        * tree.c (build): Remove.
        (build0_stat): Update comment.

From-SVN: r107909

gcc/ChangeLog
gcc/tree.c
gcc/tree.h

index aa94752abc1299f8920089e02a0c854c01103fd8..b5aab4db03a7258986e779b71681f53520a96865 100644 (file)
@@ -1,3 +1,10 @@
+2005-12-02  Richard Guenther  <rguenther@suse.de>
+
+       * tree.h (build): Remove prototype.
+       (build, _buildN1, _buildN2, _buildC1, _buildC2): Remove macros.
+       * tree.c (build): Remove.
+       (build0_stat): Update comment.
+
 2005-12-02  Richard Guenther  <rguenther@suse.de>
 
        * tree-ssa-loop-im.c (schedule_sm): Use buildN instead of build.
index d5ce531300a7294f224cabd74ac1e38a6794f1c2..6a97e4109940f35a128f3794022aa1fb1eb2772f 100644 (file)
@@ -2691,9 +2691,7 @@ do { tree _node = (NODE); \
    Constants, decls, types and misc nodes cannot be.
 
    We define 5 non-variadic functions, from 0 to 4 arguments.  This is
-   enough for all extant tree codes.  These functions can be called
-   directly (preferably!), but can also be obtained via GCC preprocessor
-   magic within the build macro.  */
+   enough for all extant tree codes.  */
 
 tree
 build0_stat (enum tree_code code, tree tt MEM_STAT_DECL)
@@ -2955,61 +2953,6 @@ build7_stat (enum tree_code code, tree tt, tree arg0, tree arg1,
   return t;
 }
 
-/* Backup definition for non-gcc build compilers.  */
-
-tree
-(build) (enum tree_code code, tree tt, ...)
-{
-  tree t, arg0, arg1, arg2, arg3, arg4, arg5, arg6;
-  int length = TREE_CODE_LENGTH (code);
-  va_list p;
-
-  va_start (p, tt);
-  switch (length)
-    {
-    case 0:
-      t = build0 (code, tt);
-      break;
-    case 1:
-      arg0 = va_arg (p, tree);
-      t = build1 (code, tt, arg0);
-      break;
-    case 2:
-      arg0 = va_arg (p, tree);
-      arg1 = va_arg (p, tree);
-      t = build2 (code, tt, arg0, arg1);
-      break;
-    case 3:
-      arg0 = va_arg (p, tree);
-      arg1 = va_arg (p, tree);
-      arg2 = va_arg (p, tree);
-      t = build3 (code, tt, arg0, arg1, arg2);
-      break;
-    case 4:
-      arg0 = va_arg (p, tree);
-      arg1 = va_arg (p, tree);
-      arg2 = va_arg (p, tree);
-      arg3 = va_arg (p, tree);
-      t = build4 (code, tt, arg0, arg1, arg2, arg3);
-      break;
-    case 7:
-      arg0 = va_arg (p, tree);
-      arg1 = va_arg (p, tree);
-      arg2 = va_arg (p, tree);
-      arg3 = va_arg (p, tree);
-      arg4 = va_arg (p, tree);
-      arg5 = va_arg (p, tree);
-      arg6 = va_arg (p, tree);
-      t = build7 (code, tt, arg0, arg1, arg2, arg3, arg4, arg5, arg6);
-      break;
-    default:
-      gcc_unreachable ();
-    }
-  va_end (p);
-
-  return t;
-}
-
 /* Similar except don't specify the TREE_TYPE
    and leave the TREE_SIDE_EFFECTS as 0.
    It is permissible for arguments to be null,
index 2a1d6e2664e9548f9b6748921adb980d80c259d7..6946dd450a8ea94cf83ef6a84a42ec5722c6d4fe 100644 (file)
@@ -3137,21 +3137,8 @@ extern tree maybe_get_identifier (const char *);
 
 /* Construct various types of nodes.  */
 
-extern tree build (enum tree_code, tree, ...);
 extern tree build_nt (enum tree_code, ...);
 
-#if GCC_VERSION >= 3000 || __STDC_VERSION__ >= 199901L
-/* Use preprocessor trickery to map "build" to "buildN" where N is the
-   expected number of arguments.  This is used for both efficiency (no
-   varargs), and checking (verifying number of passed arguments).  */
-#define build(code, ...) \
-  _buildN1(build, _buildC1(__VA_ARGS__))(code, __VA_ARGS__)
-#define _buildN1(BASE, X)      _buildN2(BASE, X)
-#define _buildN2(BASE, X)      BASE##X
-#define _buildC1(...)          _buildC2(__VA_ARGS__,9,8,7,6,5,4,3,2,1,0,0)
-#define _buildC2(x,a1,a2,a3,a4,a5,a6,a7,a8,a9,c,...) c
-#endif
-
 extern tree build0_stat (enum tree_code, tree MEM_STAT_DECL);
 #define build0(c,t) build0_stat (c,t MEM_STAT_INFO)
 extern tree build1_stat (enum tree_code, tree, tree MEM_STAT_DECL);