+2001-08-27 Andreas Jaeger <aj@suse.de>
+
+ * emit-rtl.c: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
+ * errors.c: Likewise.
+ * final.c: Likewise.
+ * dwarf2asm.c: Likewise.
+ * doprint.c (checkit): Likewise.
+ * diagnostic.c: Likewise.
+ * collect2.c: Likewise.
+ * calls.c: Likewise.
+ * c-semantics.c (build_stmt): Likewise.
+ * c-format.c (status_warning): Likewise.
+ * c-errors.c (pedwarn_c99): Likewise.
+ * builtins.c (validate_arglist): Likewise.
+ * config/pj/pj.c (pj_printf): Likewise.
+ * fix-header.c: Likewise.
+ * gcc.c: Likewise.
+ * gcov.c (fnotice): Likewise.
+ * gensupport.c (message_with_line): Likewise.
+ * mips-tfile.c: Likewise.
+ * protoize.c (notice): Likewise.
+ * read-rtl.c (fatal_with_file_and_line): Likewise.
+ * rtl-error.c: Likewise.
+ * tradcpp.c: Likewise.
+ * tree.c: Likewise.
+ * cp/tree.c (build_min_nt): Likewise.
+ (build_min): Likewise.
+ * cp/lex.c: Likewise.
+ * cp/errfn.c: Likewise.
+ * cp/rtti.c (create_pseudo_type_info): Likewise.
+
Sun Aug 26 20:25:44 2001 Denis Chertykov <denisc@overta.ru>
* df.c (df_uses_record): Return after recording all uses
static int
validate_arglist VPARAMS ((tree arglist, ...))
{
-#ifndef ANSI_PROTOTYPES
- tree arglist;
-#endif
enum tree_code code;
- va_list ap;
-
- VA_START (ap, arglist);
+ int res = 0;
-#ifndef ANSI_PROTOTYPES
- arglist = va_arg (ap, tree);
-#endif
+ VA_OPEN (ap, arglist);
+ VA_FIXEDARG (ap, tree, arglist);
do {
code = va_arg (ap, enum tree_code);
{
case 0:
/* This signifies an ellipses, any further arguments are all ok. */
- va_end (ap);
- return 1;
+ res = 1;
+ goto end;
case VOID_TYPE:
/* This signifies an endlink, if no arguments remain, return
true, otherwise return false. */
- va_end (ap);
- return arglist == 0;
+ res = arglist == 0;
+ goto end;
default:
/* If no parameters remain or the parameter's code does not
match the specified code, return false. Otherwise continue
checking any remaining arguments. */
if (arglist == 0 || code != TREE_CODE (TREE_TYPE (TREE_VALUE (arglist))))
- {
- va_end (ap);
- return 0;
- }
+ goto end;
break;
}
arglist = TREE_CHAIN (arglist);
} while (1);
+
+ /* We need gotos here since we can only have one VA_CLOSE in a
+ function. */
+ end: ;
+ VA_CLOSE (ap);
+
+ return res;
}
/* Default version of target-specific builtin setup that does nothing. */
/* Various diagnostic subroutines for the GNU C language.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001 Free Software Foundation, Inc.
Contributed by Gabriel Dos Reis <gdr@codesourcery.com>
This file is part of GCC.
void
pedwarn_c99 VPARAMS ((const char *msgid, ...))
{
-#ifndef ANSI_PROTOTYPES
- const char *msgid;
-#endif
- va_list ap;
diagnostic_context dc;
- VA_START (ap, msgid);
-
-#ifndef ANSI_PROTOTYPES
- msgid = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, msgid);
+ VA_FIXEDARG (ap, const char *, msgid);
set_diagnostic_context (&dc, msgid, &ap, input_filename, lineno,
!flag_isoc99 || !flag_pedantic_errors);
report_diagnostic (&dc);
- va_end (ap);
+ VA_CLOSE (ap);
}
static void
status_warning VPARAMS ((int *status, const char *msgid, ...))
{
-#ifndef ANSI_PROTOTYPES
- int *status;
- const char *msgid;
-#endif
- va_list ap;
diagnostic_context dc;
- VA_START (ap, msgid);
-
-#ifndef ANSI_PROTOTYPES
- status = va_arg (ap, int *);
- msgid = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, msgid);
+ VA_FIXEDARG (ap, int *, status);
+ VA_FIXEDARG (ap, const char *, msgid);
if (status)
*status = 1;
report_diagnostic (&dc);
}
- va_end (ap);
+ VA_CLOSE (ap);
}
/* Variables used by the checking of $ operand number formats. */
tree
build_stmt VPARAMS ((enum tree_code code, ...))
{
-#ifndef ANSI_PROTOTYPES
- enum tree_code code;
-#endif
- va_list p;
register tree t;
register int length;
register int i;
- VA_START (p, code);
-
-#ifndef ANSI_PROTOTYPES
- code = va_arg (p, enum tree_code);
-#endif
+ VA_OPEN (p, code);
+ VA_FIXEDARG (p, enum tree_code, code);
t = make_node (code);
length = TREE_CODE_LENGTH (code);
for (i = 0; i < length; i++)
TREE_OPERAND (t, i) = va_arg (p, tree);
- va_end (p);
+ VA_CLOSE (p);
return t;
}
void
notice VPARAMS ((const char *msgid, ...))
{
-#ifndef ANSI_PROTOTYPES
- const char *msgid;
-#endif
- va_list ap;
-
- VA_START (ap, msgid);
-
-#ifndef ANSI_PROTOTYPES
- msgid = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, msgid);
+ VA_FIXEDARG (ap, const char *, msgid);
vfprintf (stderr, _(msgid), ap);
- va_end (ap);
+ VA_CLOSE (ap);
}
/* Die when sys call fails. */
void
fatal_perror VPARAMS ((const char * msgid, ...))
{
-#ifndef ANSI_PROTOTYPES
- const char *msgid;
-#endif
int e = errno;
- va_list ap;
-
- VA_START (ap, msgid);
-#ifndef ANSI_PROTOTYPES
- msgid = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, msgid);
+ VA_FIXEDARG (ap, const char *, msgid);
fprintf (stderr, "collect2: ");
vfprintf (stderr, _(msgid), ap);
fprintf (stderr, ": %s\n", xstrerror (e));
- va_end (ap);
+ VA_CLOSE (ap);
collect_exit (FATAL_EXIT_CODE);
}
void
fatal VPARAMS ((const char * msgid, ...))
{
-#ifndef ANSI_PROTOTYPES
- const char *msgid;
-#endif
- va_list ap;
-
- VA_START (ap, msgid);
-
-#ifndef ANSI_PROTOTYPES
- msgid = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, msgid);
+ VA_FIXEDARG (ap, const char *, msgid);
fprintf (stderr, "collect2: ");
vfprintf (stderr, _(msgid), ap);
fprintf (stderr, "\n");
- va_end (ap);
+ VA_CLOSE (ap);
collect_exit (FATAL_EXIT_CODE);
}
void
error VPARAMS ((const char * msgid, ...))
{
-#ifndef ANSI_PROTOTYPES
- const char * msgid;
-#endif
- va_list ap;
-
- VA_START (ap, msgid);
-
-#ifndef ANSI_PROTOTYPES
- msgid = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, msgid);
+ VA_FIXEDARG (ap, const char *, msgid);
fprintf (stderr, "collect2: ");
vfprintf (stderr, _(msgid), ap);
fprintf (stderr, "\n");
- va_end(ap);
+ VA_CLOSE(ap);
}
/* In case obstack is linked in, and abort is defined to fancy_abort,
/* Output routines for GCC for picoJava II
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001 Free Software Foundation, Inc.
This file is part of GNU CC.
static void
pj_printf VPARAMS ((const char *template, ...))
{
-#ifndef ANSI_PROTOTYPES
- const char *template;
-#endif
register int c;
-
- va_list argptr;
int ops_read = 0;
rtx operands[10];
- VA_START (argptr, template);
-#ifndef ANSI_PROTOTYPES
- template = va_arg (argptr, const char *);
-#endif
+
+ VA_OPEN (argptr, template);
+ VA_FIXEDARG (argptr, const char *, template);
while ((c = *template++))
{
}
}
}
- va_end (argptr);
+ VA_CLOSE (argptr);
}
/* Output code to efficiently push a single word integer constant onto
/* Provide a call-back mechanism for handling error output.
- Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+ Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
Contributed by Jason Merrill (jason@cygnus.com)
void
cp_error VPARAMS ((const char *format, ...))
{
-#ifndef ANSI_PROTOTYPES
- char *format;
-#endif
- va_list ap;
-
- VA_START (ap, format);
-
-#ifndef ANSI_PROTOTYPES
- format = va_arg (ap, char *);
-#endif
+ VA_OPEN (ap, format);
+ VA_FIXEDARG (ap, const char *, format);
if (! cp_silent)
cp_thing ((errorfn *) error, 0, format, ap);
- va_end (ap);
+ VA_CLOSE (ap);
}
void
cp_warning VPARAMS ((const char *format, ...))
{
-#ifndef ANSI_PROTOTYPES
- char *format;
-#endif
- va_list ap;
-
- VA_START (ap, format);
-
-#ifndef ANSI_PROTOTYPES
- format = va_arg (ap, char *);
-#endif
+ VA_OPEN (ap, format);
+ VA_FIXEDARG (ap, const char *, format);
if (! cp_silent)
cp_thing ((errorfn *) warning, 0, format, ap);
- va_end (ap);
+ VA_CLOSE (ap);
}
void
cp_pedwarn VPARAMS ((const char *format, ...))
{
-#ifndef ANSI_PROTOTYPES
- char *format;
-#endif
- va_list ap;
-
- VA_START (ap, format);
-
-#ifndef ANSI_PROTOTYPES
- format = va_arg (ap, char *);
-#endif
+ VA_OPEN (ap, format);
+ VA_FIXEDARG (ap, const char *, format);
if (! cp_silent)
cp_thing ((errorfn *) pedwarn, 0, format, ap);
- va_end (ap);
+ VA_CLOSE (ap);
}
void
cp_compiler_error VPARAMS ((const char *format, ...))
{
-#ifndef ANSI_PROTOTYPES
- char *format;
-#endif
- va_list ap;
-
- VA_START (ap, format);
-
-#ifndef ANSI_PROTOTYPES
- format = va_arg (ap, char *);
-#endif
+ VA_OPEN (ap, format);
+ VA_FIXEDARG (ap, const char *, format);
if (! cp_silent)
cp_thing ((errorfn *) compiler_error, 0, format, ap);
- va_end (ap);
+ VA_CLOSE (ap);
}
void
void
cp_sprintf VPARAMS ((const char *format, ...))
{
-#ifndef ANSI_PROTOTYPES
- char *format;
-#endif
- va_list ap;
-
- VA_START (ap, format);
-
-#ifndef ANSI_PROTOTYPES
- format = va_arg (ap, char *);
-#endif
+ VA_OPEN (ap, format);
+ VA_FIXEDARG (ap, const char *, format);
cp_thing ((errorfn *) sprintf, 0, format, ap);
- va_end (ap);
+ VA_CLOSE (ap);
}
void
cp_error_at VPARAMS ((const char *format, ...))
{
-#ifndef ANSI_PROTOTYPES
- char *format;
-#endif
- va_list ap;
-
- VA_START (ap, format);
-
-#ifndef ANSI_PROTOTYPES
- format = va_arg (ap, char *);
-#endif
+ VA_OPEN (ap, format);
+ VA_FIXEDARG (ap, const char *, format);
if (! cp_silent)
cp_thing ((errorfn *) error_with_file_and_line, 1, format, ap);
- va_end (ap);
+ VA_CLOSE (ap);
}
void
cp_warning_at VPARAMS ((const char *format, ...))
{
-#ifndef ANSI_PROTOTYPES
- char *format;
-#endif
- va_list ap;
-
- VA_START (ap, format);
-
-#ifndef ANSI_PROTOTYPES
- format = va_arg (ap, char *);
-#endif
+ VA_OPEN (ap, format);
+ VA_FIXEDARG (ap, const char *, format);
if (! cp_silent)
cp_thing ((errorfn *) warning_with_file_and_line, 1, format, ap);
- va_end (ap);
+ VA_CLOSE (ap);
}
void
cp_pedwarn_at VPARAMS ((const char *format, ...))
{
-#ifndef ANSI_PROTOTYPES
- char *format;
-#endif
- va_list ap;
-
- VA_START (ap, format);
-
-#ifndef ANSI_PROTOTYPES
- format = va_arg (ap, char *);
-#endif
+ VA_OPEN (ap, format);
+ VA_FIXEDARG (ap, const char *, format);
if (! cp_silent)
cp_thing ((errorfn *) pedwarn_with_file_and_line, 1, format, ap);
- va_end (ap);
+ VA_CLOSE (ap);
}
void
compiler_error VPARAMS ((const char *msg, ...))
{
-#ifndef ANSI_PROTOTYPES
- const char *msg;
-#endif
char buf[1024];
- va_list ap;
-
- VA_START (ap, msg);
-#ifndef ANSI_PROTOTYPES
- msg = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, msg);
+ VA_FIXEDARG (ap, const char *, msg);
vsprintf (buf, msg, ap);
- va_end (ap);
+ VA_CLOSE (ap);
+
error_with_file_and_line (input_filename, lineno, "%s (compiler error)", buf);
}
static tree
create_pseudo_type_info VPARAMS((const char *real_name, int ident, ...))
{
-#ifndef ANSI_PROTOTYPES
- char const *real_name;
- int ident;
-#endif
- va_list ap;
tree real_type, pseudo_type;
char *pseudo_name;
tree vtable_decl;
tree fields[10];
tree field_decl;
tree result;
-
- VA_START (ap, ident);
-#ifndef ANSI_PROTOTYPES
- real_name = va_arg (ap, char const *);
- ident = va_arg (ap, int);
-#endif
+
+ VA_OPEN (ap, ident);
+ VA_FIXEDARG (ap, const char *, real_name);
+ VA_FIXEDARG (ap, int, ident);
/* Generate the pseudo type name. */
pseudo_name = (char *)alloca (strlen (real_name) + 30);
pseudo_type = make_aggr_type (RECORD_TYPE);
finish_builtin_type (pseudo_type, pseudo_name, fields, ix, ptr_type_node);
TYPE_HAS_CONSTRUCTOR (pseudo_type) = 1;
- va_end (ap);
-
+ VA_CLOSE (ap);
+
result = tree_cons (NULL_TREE, NULL_TREE, NULL_TREE);
TINFO_VTABLE_DECL (result) = vtable_decl;
TINFO_PSEUDO_TYPE (result) = pseudo_type;
tree
build_min_nt VPARAMS ((enum tree_code code, ...))
{
-#ifndef ANSI_PROTOTYPES
- enum tree_code code;
-#endif
- va_list p;
register tree t;
register int length;
register int i;
- VA_START (p, code);
-
-#ifndef ANSI_PROTOTYPES
- code = va_arg (p, enum tree_code);
-#endif
+ VA_OPEN (p, code);
+ VA_FIXEDARG (p, enum tree_code, code);
t = make_node (code);
length = TREE_CODE_LENGTH (code);
TREE_OPERAND (t, i) = x;
}
- va_end (p);
+ VA_CLOSE (p);
return t;
}
tree
build_min VPARAMS ((enum tree_code code, tree tt, ...))
{
-#ifndef ANSI_PROTOTYPES
- enum tree_code code;
- tree tt;
-#endif
- va_list p;
register tree t;
register int length;
register int i;
- VA_START (p, tt);
-
-#ifndef ANSI_PROTOTYPES
- code = va_arg (p, enum tree_code);
- tt = va_arg (p, tree);
-#endif
+ VA_OPEN (p, tt);
+ VA_FIXEDARG (p, enum tree_code, code);
+ VA_FIXEDARG (p, tree, tt);
t = make_node (code);
length = TREE_CODE_LENGTH (code);
TREE_OPERAND (t, i) = x;
}
- va_end (p);
+ VA_CLOSE (p);
return t;
}
/* Provide a version _doprnt in terms of fprintf.
- Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
Contributed by Kaveh Ghazi (ghazi@caip.rutgers.edu) 3/29/98
This program is free software; you can redistribute it and/or modify it
static int
checkit VPARAMS ((const char* format, ...))
{
- va_list args;
int result;
-
-#ifndef ANSI_PROTOTYPES
- char *format;
-#endif
-
- VA_START (args, format);
-
-#ifndef ANSI_PROTOTYPES
- format = va_arg (args, char *);
-#endif
+ VA_OPEN (args, format);
+ VA_FIXEDARG (args, char *, format);
result = _doprnt (format, args, stdout);
- va_end(args);
+ VA_CLOSE (args);
return result;
}
dw2_asm_output_data VPARAMS ((int size, unsigned HOST_WIDE_INT value,
const char *comment, ...))
{
-#ifndef ANSI_PROTOTYPES
- int size;
- unsigned HOST_WIDE_INT value;
- const char *comment;
-#endif
- va_list ap;
-
- VA_START (ap, comment);
-
-#ifndef ANSI_PROTOTYPES
- size = va_arg (ap, int);
- value = va_arg (ap, unsigned HOST_WIDE_INT);
- comment = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, comment);
+ VA_FIXEDARG (ap, int, size);
+ VA_FIXEDARG (ap, unsigned HOST_WIDE_INT, value);
+ VA_FIXEDARG (ap, const char *, comment);
if (size * 8 < HOST_BITS_PER_WIDE_INT)
value &= ~(~(unsigned HOST_WIDE_INT)0 << (size * 8));
}
fputc ('\n', asm_out_file);
- va_end (ap);
+ VA_CLOSE (ap);
}
/* Output the difference between two symbols in a given size. */
dw2_asm_output_delta VPARAMS ((int size, const char *lab1, const char *lab2,
const char *comment, ...))
{
-#ifndef ANSI_PROTOTYPES
- int size;
- const char *lab1, *lab2;
- const char *comment;
-#endif
- va_list ap;
-
- VA_START (ap, comment);
-
-#ifndef ANSI_PROTOTYPES
- size = va_arg (ap, int);
- lab1 = va_arg (ap, const char *);
- lab2 = va_arg (ap, const char *);
- comment = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, comment);
+ VA_FIXEDARG (ap, int, size);
+ VA_FIXEDARG (ap, const char *, lab1);
+ VA_FIXEDARG (ap, const char *, lab2);
+ VA_FIXEDARG (ap, const char *, comment);
#ifdef UNALIGNED_INT_ASM_OP
fputs (unaligned_integer_asm_op (size), asm_out_file);
}
fputc ('\n', asm_out_file);
- va_end (ap);
+ VA_CLOSE (ap);
}
/* Output a section-relative reference to a label. In general this
dw2_asm_output_offset VPARAMS ((int size, const char *label,
const char *comment, ...))
{
-#ifndef ANSI_PROTOTYPES
- int size;
- const char *label;
- const char *comment;
-#endif
- va_list ap;
-
- VA_START (ap, comment);
-
-#ifndef ANSI_PROTOTYPES
- size = va_arg (ap, int);
- label = va_arg (ap, const char *);
- comment = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, comment);
+ VA_FIXEDARG (ap, int, size);
+ VA_FIXEDARG (ap, const char *, label);
+ VA_FIXEDARG (ap, const char *, comment);
#ifdef ASM_OUTPUT_DWARF_OFFSET
ASM_OUTPUT_DWARF_OFFSET (asm_out_file, size, label);
}
fputc ('\n', asm_out_file);
- va_end (ap);
+ VA_CLOSE (ap);
}
/* Output a self-relative reference to a label, possibly in a
dw2_asm_output_pcrel VPARAMS ((int size, const char *label,
const char *comment, ...))
{
-#ifndef ANSI_PROTOTYPES
- int size;
- const char *label;
- const char *comment;
-#endif
- va_list ap;
-
- VA_START (ap, comment);
-
-#ifndef ANSI_PROTOTYPES
- size = va_arg (ap, int);
- label = va_arg (ap, const char *);
- comment = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, comment);
+ VA_FIXEDARG (ap, int, size);
+ VA_FIXEDARG (ap, const char *, label);
+ VA_FIXEDARG (ap, const char *, comment);
#ifdef ASM_OUTPUT_DWARF_PCREL
ASM_OUTPUT_DWARF_PCREL (asm_out_file, size, label);
}
fputc ('\n', asm_out_file);
- va_end (ap);
+ VA_CLOSE (ap);
}
/* Output an absolute reference to a label. */
dw2_asm_output_addr VPARAMS ((int size, const char *label,
const char *comment, ...))
{
-#ifndef ANSI_PROTOTYPES
- int size;
- const char *label;
- const char *comment;
-#endif
- va_list ap;
-
- VA_START (ap, comment);
-
-#ifndef ANSI_PROTOTYPES
- size = va_arg (ap, int);
- label = va_arg (ap, const char *);
- comment = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, comment);
+ VA_FIXEDARG (ap, int, size);
+ VA_FIXEDARG (ap, const char *, label);
+ VA_FIXEDARG (ap, const char *, comment);
#ifdef UNALIGNED_INT_ASM_OP
fputs (unaligned_integer_asm_op (size), asm_out_file);
}
fputc ('\n', asm_out_file);
- va_end (ap);
+ VA_CLOSE (ap);
}
/* Similar, but use an RTX expression instead of a text label. */
dw2_asm_output_addr_rtx VPARAMS ((int size, rtx addr,
const char *comment, ...))
{
-#ifndef ANSI_PROTOTYPES
- int size;
- rtx addr;
- const char *comment;
-#endif
- va_list ap;
-
- VA_START (ap, comment);
-
-#ifndef ANSI_PROTOTYPES
- size = va_arg (ap, int);
- addr = va_arg (ap, rtx);
- comment = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, comment);
+ VA_FIXEDARG (ap, int, size);
+ VA_FIXEDARG (ap, rtx, addr);
+ VA_FIXEDARG (ap, const char *, comment);
#ifdef UNALIGNED_INT_ASM_OP
fputs (unaligned_integer_asm_op (size), asm_out_file);
}
fputc ('\n', asm_out_file);
- va_end (ap);
+ VA_CLOSE (ap);
}
void
dw2_asm_output_nstring VPARAMS ((const char *str, size_t orig_len,
const char *comment, ...))
{
-#ifndef ANSI_PROTOTYPES
- const char *str;
- size_t orig_len;
- const char *comment;
-#endif
- va_list ap;
- size_t i, len = orig_len;
+ size_t i, len;
- VA_START (ap, comment);
+ VA_OPEN (ap, comment);
+ VA_FIXEDARG (ap, const char *, str);
+ VA_FIXEDARG (ap, size_t, len);
+ VA_FIXEDARG (ap, const char *, comment);
-#ifndef ANSI_PROTOTYPES
- str = va_arg (ap, const char *);
- len = va_arg (ap, size_t);
- comment = va_arg (ap, const char *);
-#endif
+ len = orig_len;
if (len == (size_t) -1)
len = strlen (str);
fprintf (asm_out_file, "%s0\n", ASM_BYTE_OP);
}
- va_end (ap);
+ VA_CLOSE (ap);
}
\f
dw2_asm_output_data_uleb128 VPARAMS ((unsigned HOST_WIDE_INT value,
const char *comment, ...))
{
-#ifndef ANSI_PROTOTYPES
- unsigned HOST_WIDE_INT value;
- const char *comment;
-#endif
- va_list ap;
-
- VA_START (ap, comment);
-
-#ifndef ANSI_PROTOTYPES
- value = va_arg (ap, unsigned HOST_WIDE_INT);
- comment = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, comment);
+ VA_FIXEDARG (ap, unsigned HOST_WIDE_INT, value);
+ VA_FIXEDARG (ap, const char *, comment);
#ifdef HAVE_AS_LEB128
fputs ("\t.uleb128 ", asm_out_file);
#endif
fputc ('\n', asm_out_file);
- va_end (ap);
+ VA_CLOSE (ap);
}
/* Output an signed LEB128 quantity. */
dw2_asm_output_data_sleb128 VPARAMS ((HOST_WIDE_INT value,
const char *comment, ...))
{
-#ifndef ANSI_PROTOTYPES
- HOST_WIDE_INT value;
- const char *comment;
-#endif
- va_list ap;
-
- VA_START (ap, comment);
-
-#ifndef ANSI_PROTOTYPES
- value = va_arg (ap, HOST_WIDE_INT);
- comment = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, comment);
+ VA_FIXEDARG (ap, HOST_WIDE_INT, value);
+ VA_FIXEDARG (ap, const char *, comment);
#ifdef HAVE_AS_LEB128
fputs ("\t.sleb128 ", asm_out_file);
#endif
fputc ('\n', asm_out_file);
- va_end (ap);
+ VA_CLOSE (ap);
}
void
const char *lab2 ATTRIBUTE_UNUSED,
const char *comment, ...))
{
-#ifndef ANSI_PROTOTYPES
- const char *lab1, *lab2;
- const char *comment;
-#endif
- va_list ap;
-
- VA_START (ap, comment);
-
-#ifndef ANSI_PROTOTYPES
- lab1 = va_arg (ap, const char *);
- lab2 = va_arg (ap, const char *);
- comment = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, comment);
+ VA_FIXEDARG (ap, const char *, lab1);
+ VA_FIXEDARG (ap, const char *, lab2);
+ VA_FIXEDARG (ap, const char *, comment);
#ifdef HAVE_AS_LEB128
fputs ("\t.uleb128 ", asm_out_file);
}
fputc ('\n', asm_out_file);
- va_end (ap);
+ VA_CLOSE (ap);
}
void
const char *lab2 ATTRIBUTE_UNUSED,
const char *comment, ...))
{
-#ifndef ANSI_PROTOTYPES
- const char *lab1, *lab2;
- const char *comment;
-#endif
- va_list ap;
-
- VA_START (ap, comment);
-
-#ifndef ANSI_PROTOTYPES
- lab1 = va_arg (ap, const char *);
- lab2 = va_arg (ap, const char *);
- comment = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, comment);
+ VA_FIXEDARG (ap, const char *, lab1);
+ VA_FIXEDARG (ap, const char *, lab2);
+ VA_FIXEDARG (ap, const char *, comment);
#ifdef HAVE_AS_LEB128
fputs ("\t.sleb128 ", asm_out_file);
}
fputc ('\n', asm_out_file);
- va_end (ap);
+ VA_CLOSE (ap);
}
\f
static rtx dw2_force_const_mem PARAMS ((rtx));
rtx addr,
const char *comment, ...))
{
-#ifndef ANSI_PROTOTYPES
- int encoding;
- rtx addr;
- const char *comment;
-#endif
- va_list ap;
int size;
- VA_START (ap, comment);
-
-#ifndef ANSI_PROTOTYPES
- encoding = va_arg (ap, int);
- addr = va_arg (ap, rtx);
- comment = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, comment);
+ VA_FIXEDARG (ap, int, encoding);
+ VA_FIXEDARG (ap, rtx, addr);
+ VA_FIXEDARG (ap, const char *, comment);
size = size_of_encoded_value (encoding);
}
fputc ('\n', asm_out_file);
- va_end (ap);
+ VA_CLOSE (ap);
}
rtx
gen_rtx VPARAMS ((enum rtx_code code, enum machine_mode mode, ...))
{
-#ifndef ANSI_PROTOTYPES
- enum rtx_code code;
- enum machine_mode mode;
-#endif
- va_list p;
register int i; /* Array indices... */
register const char *fmt; /* Current rtx's format... */
register rtx rt_val; /* RTX to return to caller... */
- VA_START (p, mode);
-
-#ifndef ANSI_PROTOTYPES
- code = va_arg (p, enum rtx_code);
- mode = va_arg (p, enum machine_mode);
-#endif
+ VA_OPEN (p, mode);
+ VA_FIXEDARG (p, enum rtx_code, code);
+ VA_FIXEDARG (p, enum machine_mode, mode);
switch (code)
{
break;
}
- va_end (p);
+ VA_CLOSE (p);
return rt_val;
}
rtvec
gen_rtvec VPARAMS ((int n, ...))
{
-#ifndef ANSI_PROTOTYPES
- int n;
-#endif
int i;
- va_list p;
rtx *vector;
- VA_START (p, n);
-
-#ifndef ANSI_PROTOTYPES
- n = va_arg (p, int);
-#endif
+ VA_OPEN (p, n);
+ VA_FIXEDARG (p, int, n);
if (n == 0)
return NULL_RTVEC; /* Don't allocate an empty rtvec... */
for (i = 0; i < n; i++)
vector[i] = va_arg (p, rtx);
- va_end (p);
+ VA_CLOSE (p);
return gen_rtvec_v (n, vector);
}
void
warning VPARAMS ((const char *format, ...))
{
-#ifndef ANSI_PROTOTYPES
- const char *format;
-#endif
- va_list ap;
-
- VA_START (ap, format);
-
-#ifndef ANSI_PROTOTYPES
- format = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, format);
+ VA_FIXEDARG (ap, const char *, format);
fprintf (stderr, "%s: warning: ", progname);
vfprintf (stderr, format, ap);
- va_end (ap);
+ VA_CLOSE (ap);
fputc('\n', stderr);
}
void
error VPARAMS ((const char *format, ...))
{
-#ifndef ANSI_PROTOTYPES
- const char *format;
-#endif
- va_list ap;
-
- VA_START (ap, format);
-
-#ifndef ANSI_PROTOTYPES
- format = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, format);
+ VA_FIXEDARG (ap, const char *, format);
fprintf (stderr, "%s: ", progname);
vfprintf (stderr, format, ap);
- va_end (ap);
+ VA_CLOSE (ap);
fputc('\n', stderr);
have_error = 1;
void
fatal VPARAMS ((const char *format, ...))
{
-#ifndef ANSI_PROTOTYPES
- const char *format;
-#endif
- va_list ap;
-
- VA_START (ap, format);
-
-#ifndef ANSI_PROTOTYPES
- format = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, format);
+ VA_FIXEDARG (ap, const char *, format);
fprintf (stderr, "%s: ", progname);
vfprintf (stderr, format, ap);
- va_end (ap);
+ VA_CLOSE (ap);
fputc('\n', stderr);
exit (FATAL_EXIT_CODE);
}
void
internal_error VPARAMS ((const char *format, ...))
{
-#ifndef ANSI_PROTOTYPES
- const char *format;
-#endif
- va_list ap;
-
- VA_START (ap, format);
-
-#ifndef ANSI_PROTOTYPES
- format = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, format);
+ VA_FIXEDARG (ap, const char *, format);
fprintf (stderr, "%s: Internal error: ", progname);
vfprintf (stderr, format, ap);
- va_end (ap);
+ VA_CLOSE (ap);
fputc ('\n', stderr);
exit (FATAL_EXIT_CODE);
}
void
asm_fprintf VPARAMS ((FILE *file, const char *p, ...))
{
-#ifndef ANSI_PROTOTYPES
- FILE *file;
- const char *p;
-#endif
- va_list argptr;
char buf[10];
char *q, c;
- VA_START (argptr, p);
-
-#ifndef ANSI_PROTOTYPES
- file = va_arg (argptr, FILE *);
- p = va_arg (argptr, const char *);
-#endif
+ VA_OPEN (argptr, p);
+ VA_FIXEDARG (argptr, FILE *, file);
+ VA_FIXEDARG (argptr, const char *, p);
buf[0] = '%';
default:
fputc (c, file);
}
- va_end (argptr);
+ VA_CLOSE (argptr);
}
\f
/* Split up a CONST_DOUBLE or integer constant rtx
/* fix-header.c - Make C header file suitable for C++.
Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000 Free Software Foundation, Inc.
+ 1999, 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
static void
fatal VPARAMS ((const char *str, ...))
{
-#ifndef ANSI_PROTOTYPES
- const char *str;
-#endif
- va_list ap;
-
- VA_START (ap, str);
-
-#ifndef ANSI_PROTOTYPES
- str = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, str);
+ VA_FIXEDARG (ap, const char *, str);
v_fatal (str, ap);
- va_end (ap);
+ VA_CLOSE (ap);
}
void
fatal VPARAMS ((const char *msgid, ...))
{
-#ifndef ANSI_PROTOTYPES
- const char *msgid;
-#endif
- va_list ap;
-
- VA_START (ap, msgid);
-
-#ifndef ANSI_PROTOTYPES
- msgid = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, msgid);
+ VA_FIXEDARG (ap, const char *, msgid);
fprintf (stderr, "%s: ", programname);
vfprintf (stderr, _(msgid), ap);
- va_end (ap);
+ VA_CLOSE (ap);
fprintf (stderr, "\n");
delete_temp_files ();
exit (1);
void
error VPARAMS ((const char *msgid, ...))
{
-#ifndef ANSI_PROTOTYPES
- const char *msgid;
-#endif
- va_list ap;
-
- VA_START (ap, msgid);
-
-#ifndef ANSI_PROTOTYPES
- msgid = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, msgid);
+ VA_FIXEDARG (ap, const char *, msgid);
fprintf (stderr, "%s: ", programname);
vfprintf (stderr, _(msgid), ap);
- va_end (ap);
+ VA_CLOSE (ap);
fprintf (stderr, "\n");
}
static void
notice VPARAMS ((const char *msgid, ...))
{
-#ifndef ANSI_PROTOTYPES
- const char *msgid;
-#endif
- va_list ap;
-
- VA_START (ap, msgid);
-
-#ifndef ANSI_PROTOTYPES
- msgid = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, msgid);
+ VA_FIXEDARG (ap, const char *, msgid);
vfprintf (stderr, _(msgid), ap);
- va_end (ap);
+ VA_CLOSE (ap);
}
\f
static void
static void
fnotice VPARAMS ((FILE *file, const char *msgid, ...))
{
-#ifndef ANSI_PROTOTYPES
- FILE *file;
- const char *msgid;
-#endif
- va_list ap;
-
- VA_START (ap, msgid);
-
-#ifndef ANSI_PROTOTYPES
- file = va_arg (ap, FILE *);
- msgid = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, msgid);
+ VA_FIXEDARG (ap, FILE *, file);
+ VA_FIXEDARG (ap, const char *, msgid);
vfprintf (file, _(msgid), ap);
- va_end (ap);
+ VA_CLOSE (ap);
}
/* More 'friendly' abort that prints the line and file.
void
message_with_line VPARAMS ((int lineno, const char *msg, ...))
{
-#ifndef ANSI_PROTOTYPES
- int lineno;
- const char *msg;
-#endif
- va_list ap;
-
- VA_START (ap, msg);
-
-#ifndef ANSI_PROTOTYPES
- lineno = va_arg (ap, int);
- msg = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, msg);
+ VA_FIXEDARG (ap, int, lineno);
+ VA_FIXEDARG (ap, const char *, msg);
fprintf (stderr, "%s:%d: ", read_rtx_filename, lineno);
vfprintf (stderr, msg, ap);
fputc ('\n', stderr);
- va_end (ap);
+ VA_CLOSE (ap);
}
\f
/* Queue PATTERN on LIST_TAIL. */
void
fatal VPARAMS ((const char *format, ...))
{
-#ifndef ANSI_PROTOTYPES
- const char *format;
-#endif
- va_list ap;
-
- VA_START (ap, format);
-
-#ifndef ANSI_PROTOTYPES
- format = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, format);
+ VA_FIXEDARG (ap, const char *, format);
if (line_number > 0)
fprintf (stderr, "%s, %s:%ld ", progname, input_name, line_number);
fprintf (stderr, "%s:", progname);
vfprintf (stderr, format, ap);
- va_end (ap);
+ VA_CLOSE (ap);
fprintf (stderr, "\n");
if (line_number > 0)
fprintf (stderr, "line:\t%s\n", cur_line_start);
void
error VPARAMS ((const char *format, ...))
{
-#ifndef ANSI_PROTOTYPES
- char *format;
-#endif
- va_list ap;
-
- VA_START (ap, format);
-
-#ifndef ANSI_PROTOTYPES
- format = va_arg (ap, char *);
-#endif
+ VA_OPEN (ap, format);
+ VA_FIXEDARG (ap, char *, format);
if (line_number > 0)
fprintf (stderr, "%s, %s:%ld ", progname, input_name, line_number);
fprintf (stderr, "line:\t%s\n", cur_line_start);
had_errors++;
- va_end (ap);
+ VA_CLOSE (ap);
saber_stop ();
}
/* Protoize program - Original version by Ron Guilmette (rfg@segfault.us.com).
Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000 Free Software Foundation, Inc.
+ 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of GCC.
static void
notice VPARAMS ((const char *msgid, ...))
{
-#ifndef ANSI_PROTOTYPES
- const char *msgid;
-#endif
- va_list ap;
-
- VA_START (ap, msgid);
-
-#ifndef ANSI_PROTOTYPES
- msgid = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, msgid);
+ VA_FIXEDARG (ap, const char *, msgid);
vfprintf (stderr, _(msgid), ap);
- va_end (ap);
+ VA_CLOSE (ap);
}
\f
static void
fatal_with_file_and_line VPARAMS ((FILE *infile, const char *msg, ...))
{
-#ifndef ANSI_PROTOTYPES
- FILE *infile;
- const char *msg;
-#endif
- va_list ap;
char context[64];
size_t i;
int c;
- VA_START (ap, msg);
-
-#ifndef ANSI_PROTOTYPES
- infile = va_arg (ap, FILE *);
- msg = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, msg);
+ VA_FIXEDARG (ap, FILE *, infile);
+ VA_FIXEDARG (ap, const char *, msg);
fprintf (stderr, "%s:%d: ", read_rtx_filename, read_rtx_lineno);
vfprintf (stderr, msg, ap);
fprintf (stderr, "%s:%d: following context is `%s'\n",
read_rtx_filename, read_rtx_lineno, context);
- va_end (ap);
+ VA_CLOSE (ap);
exit (1);
}
void
error_for_asm VPARAMS ((rtx insn, const char *msgid, ...))
{
-#ifndef ANSI_PROTOTYPES
- rtx insn;
- const char *msgid;
-#endif
- va_list ap;
-
- VA_START (ap, msgid);
-
-#ifndef ANSI_PROTOTYPES
- insn = va_arg (ap, rtx);
- msgid = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, msgid);
+ VA_FIXEDARG (ap, rtx, insn);
+ VA_FIXEDARG (ap, const char *, msgid);
diagnostic_for_asm (insn, msgid, &ap, /* warn = */ 0);
- va_end (ap);
+ VA_CLOSE (ap);
}
void
warning_for_asm VPARAMS ((rtx insn, const char *msgid, ...))
{
-#ifndef ANSI_PROTOTYPES
- rtx insn;
- const char *msgid;
-#endif
- va_list ap;
-
- VA_START (ap, msgid);
-
-#ifndef ANSI_PROTOTYPES
- insn = va_arg (ap, rtx);
- msgid = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, msgid);
+ VA_FIXEDARG (ap, rtx, insn);
+ VA_FIXEDARG (ap, const char *, msgid);
diagnostic_for_asm (insn, msgid, &ap, /* warn = */ 1);
- va_end (ap);
+ VA_CLOSE (ap);
}
void
void
error VPARAMS ((const char *msgid, ...))
{
-#ifndef ANSI_PROTOTYPES
- const char *msgid;
-#endif
- va_list ap;
-
- VA_START(ap, msgid);
-
-#ifndef ANSI_PROTOTYPES
- msgid = va_arg (ap, const char *);
-#endif
+ VA_OPEN(ap, msgid);
+ VA_FIXEDARG (ap, const char *, msgid);
v_message (ERROR, 0, msgid, ap);
+ VA_CLOSE (ap);
}
void
error_with_line VPARAMS ((int line, const char *msgid, ...))
{
-#ifndef ANSI_PROTOTYPES
- int line;
- const char *msgid;
-#endif
- va_list ap;
-
- VA_START(ap, msgid);
-
-#ifndef ANSI_PROTOTYPES
- line = va_arg (ap, int);
- msgid = va_arg (ap, const char *);
-#endif
+ VA_OPEN(ap, msgid);
+ VA_FIXEDARG (ap, int, line);
+ VA_FIXEDARG (ap, const char *, msgid);
v_message (ERROR, line, msgid, ap);
+ VA_CLOSE (ap);
}
/* Error including a message from `errno'. */
void
warning VPARAMS ((const char *msgid, ...))
{
-#ifndef ANSI_PROTOTYPES
- const char *msgid;
-#endif
- va_list ap;
-
- VA_START(ap, msgid);
-
-#ifndef ANSI_PROTOTYPES
- msgid = va_arg (ap, const char *);
-#endif
+ VA_OPEN(ap, msgid);
+ VA_FIXEDARG (ap, const char *, msgid);
v_message (WARNING, 0, msgid, ap);
+ VA_CLOSE (ap);
}
void
fatal VPARAMS ((const char *msgid, ...))
{
-#ifndef ANSI_PROTOTYPES
- const char *msgid;
-#endif
- va_list ap;
-
- VA_START(ap, msgid);
-
-#ifndef ANSI_PROTOTYPES
- msgid = va_arg (ap, const char *);
-#endif
+ VA_OPEN(ap, msgid);
+ VA_FIXEDARG (ap, const char *, msgid);
v_message (FATAL, 0, msgid, ap);
+ VA_CLOSE (ap);
exit (FATAL_EXIT_CODE);
}
tree
build VPARAMS ((enum tree_code code, tree tt, ...))
{
-#ifndef ANSI_PROTOTYPES
- enum tree_code code;
- tree tt;
-#endif
- va_list p;
register tree t;
register int length;
register int i;
int fro;
int constant;
- VA_START (p, tt);
-
-#ifndef ANSI_PROTOTYPES
- code = va_arg (p, enum tree_code);
- tt = va_arg (p, tree);
-#endif
+ VA_OPEN (p, tt);
+ VA_FIXEDARG (p, enum tree_code, code);
+ VA_FIXEDARG (p, tree, tt);
t = make_node (code);
length = TREE_CODE_LENGTH (code);
}
}
}
- va_end (p);
+ VA_CLOSE (p);
TREE_CONSTANT (t) = constant;
return t;
tree
build_nt VPARAMS ((enum tree_code code, ...))
{
-#ifndef ANSI_PROTOTYPES
- enum tree_code code;
-#endif
- va_list p;
register tree t;
register int length;
register int i;
- VA_START (p, code);
-
-#ifndef ANSI_PROTOTYPES
- code = va_arg (p, enum tree_code);
-#endif
+ VA_OPEN (p, code);
+ VA_FIXEDARG (p, enum tree_code, code);
t = make_node (code);
length = TREE_CODE_LENGTH (code);
for (i = 0; i < length; i++)
TREE_OPERAND (t, i) = va_arg (p, tree);
- va_end (p);
+ VA_CLOSE (p);
return t;
}