From 41109364f57e758fb7afd2c4c519a7f4b6c6cd48 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Thu, 10 Feb 1994 08:13:41 -0500 Subject: [PATCH] Use PROTO for varargs functions. (VPROTO): New macro. From-SVN: r6519 --- gcc/rtl.h | 19 +++++++++---------- gcc/tree.h | 19 ++++++++----------- 2 files changed, 17 insertions(+), 21 deletions(-) diff --git a/gcc/rtl.h b/gcc/rtl.h index a8a6399e209..c6e47b2fa21 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -151,6 +151,14 @@ typedef struct rtx_def #endif #endif +#ifdef __STDC__ +#define VPROTO(ARGS) ARGS +#define VA_START(va_list,var) va_start(va_list,var) +#else +#define VPROTO(ARGS) (va_alist) va_dcl +#define VA_START(va_list,var) va_start(va_list) +#endif + #define NULL_RTX (rtx) 0 /* Define a generic NULL if one hasn't already been defined. */ @@ -643,20 +651,11 @@ extern rtx plus_constant_for_output_wide PROTO((rtx, HOST_WIDE_INT)); #define GEN_INT(N) gen_rtx (CONST_INT, VOIDmode, (HOST_WIDE_INT) (N)) -#if 0 -/* We cannot define prototypes for the variable argument functions, - since they have not been ANSI-fied, and an ANSI compiler would - complain when compiling the definition of these functions. */ +extern rtx bc_gen_rtx (); extern rtx gen_rtx PROTO((enum rtx_code, enum machine_mode, ...)); extern rtvec gen_rtvec PROTO((int, ...)); -#else -extern rtx bc_gen_rtx (); -extern rtx gen_rtx (); -extern rtvec gen_rtvec (); -#endif - #ifdef BUFSIZ /* stdio.h has been included */ extern rtx read_rtx PROTO((FILE *)); #else diff --git a/gcc/tree.h b/gcc/tree.h index a697f96666b..ed5440afbf9 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -1,5 +1,5 @@ /* Front-end tree definitions for GNU compiler. - Copyright (C) 1989, 1993 Free Software Foundation, Inc. + Copyright (C) 1989, 1993, 1994 Free Software Foundation, Inc. This file is part of GNU CC. @@ -987,6 +987,13 @@ union tree_node #endif #endif +#ifdef __STDC__ +#define VPROTO(ARGS) ARGS +#define VA_START(va_list,var) va_start(va_list,var) +#else +#define VPROTO(ARGS) (va_alist) va_dcl +#define VA_START(va_list,var) va_start(va_list) +#endif #define NULL_TREE (tree) NULL @@ -1063,19 +1070,9 @@ extern tree get_identifier PROTO((char *)); #define build_int_2(LO,HI) \ build_int_2_wide ((HOST_WIDE_INT) (LO), (HOST_WIDE_INT) (HI)) -#if 0 -/* We cannot define prototypes for the variable argument functions, - since they have not been ANSI-fied, and an ANSI compiler would - complain when compiling the definition of these functions. */ - extern tree build PROTO((enum tree_code, tree, ...)); extern tree build_nt PROTO((enum tree_code, ...)); extern tree build_parse_node PROTO((enum tree_code, ...)); -#else -extern tree build (); -extern tree build_nt (); -extern tree build_parse_node (); -#endif extern tree build_int_2_wide PROTO((HOST_WIDE_INT, HOST_WIDE_INT)); extern tree build_real PROTO((tree, REAL_VALUE_TYPE)); -- 2.30.2