Commit 8be64d09 by Jason Merrill

errfn.c: Change varargs code to look like toplev.c.

	* errfn.c: Change varargs code to look like toplev.c.
	* method.c (process_modifiers): Don't prepend 'U' for char or
	wchar_t.

From-SVN: r25386
parent bd022652
Sun Feb 21 20:38:00 1999 H.J. Lu (hjl@gnu.org)
1999-02-23 Jason Merrill <jason@yorick.cygnus.com>
* errfn.c: Change varargs code to look like toplev.c.
* method.c (process_modifiers): Don't prepend 'U' for char or
wchar_t.
1999-02-20 Craig Burley <craig@jcb-sc.com>
* Make-lang.in (cplib2.ready): Don't consider updating
cplib2 stuff if the current directory isn't writable, as
it won't work (such as during a `make install').
Sun Feb 21 20:38:00 1999 H.J. Lu (hjl@gnu.org)
* decl2.c (start_objects): Make file scope constructors and
destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
......
/* Provide a call-back mechanism for handling error output.
Copyright (C) 1993, 94-97, 1998 Free Software Foundation, Inc.
Copyright (C) 1993, 94-98, 1999 Free Software Foundation, Inc.
Contributed by Jason Merrill (jason@cygnus.com)
This file is part of GNU CC.
......@@ -47,17 +47,12 @@ extern int cp_line_of PROTO((tree));
/* This function supports only `%s', `%d', `%%', and the C++ print
codes. */
#ifdef __STDC__
static void
cp_thing (errorfn *errfn, int atarg1, const char *format, va_list ap)
#else
static void
cp_thing (errfn, atarg1, format, ap)
errorfn *errfn;
int atarg1;
const char *format;
va_list ap;
#endif
{
static char *buf;
static long buflen;
......@@ -194,81 +189,154 @@ cp_thing (errfn, atarg1, format, ap)
}
#ifdef __STDC__
#define DECLARE(name) void name (const char *format, ...)
#define INIT va_start (ap, format)
#else
#define DECLARE(name) void name (format, va_alist) char *format; va_dcl
#define INIT va_start (ap)
#endif
DECLARE (cp_error)
void
cp_error VPROTO((const char *format, ...))
{
#ifndef ANSI_PROTOTYPES
char *format;
#endif
va_list ap;
INIT;
VA_START (ap, format);
#ifndef ANSI_PROTOTYPES
format = va_arg (ap, char *);
#endif
if (! cp_silent)
cp_thing ((errorfn *) error, 0, format, ap);
va_end (ap);
}
DECLARE (cp_warning)
void
cp_warning VPROTO((const char *format, ...))
{
#ifndef ANSI_PROTOTYPES
char *format;
#endif
va_list ap;
INIT;
VA_START (ap, format);
#ifndef ANSI_PROTOTYPES
format = va_arg (ap, char *);
#endif
if (! cp_silent)
cp_thing ((errorfn *) warning, 0, format, ap);
va_end (ap);
}
DECLARE (cp_pedwarn)
void
cp_pedwarn VPROTO((const char *format, ...))
{
#ifndef ANSI_PROTOTYPES
char *format;
#endif
va_list ap;
INIT;
VA_START (ap, format);
#ifndef ANSI_PROTOTYPES
format = va_arg (ap, char *);
#endif
if (! cp_silent)
cp_thing ((errorfn *) pedwarn, 0, format, ap);
va_end (ap);
}
DECLARE (cp_compiler_error)
extern errorfn compiler_error;
void
cp_compiler_error VPROTO((const char *format, ...))
{
extern errorfn compiler_error;
#ifndef ANSI_PROTOTYPES
char *format;
#endif
va_list ap;
INIT;
VA_START (ap, format);
#ifndef ANSI_PROTOTYPES
format = va_arg (ap, char *);
#endif
if (! cp_silent)
cp_thing (compiler_error, 0, format, ap);
va_end (ap);
}
DECLARE (cp_sprintf)
void
cp_sprintf VPROTO((const char *format, ...))
{
#ifndef ANSI_PROTOTYPES
char *format;
#endif
va_list ap;
INIT;
VA_START (ap, format);
#ifndef ANSI_PROTOTYPES
format = va_arg (ap, char *);
#endif
cp_thing ((errorfn *) sprintf, 0, format, ap);
va_end (ap);
}
DECLARE (cp_error_at)
void
cp_error_at VPROTO((const char *format, ...))
{
#ifndef ANSI_PROTOTYPES
char *format;
#endif
va_list ap;
INIT;
VA_START (ap, format);
#ifndef ANSI_PROTOTYPES
format = va_arg (ap, char *);
#endif
if (! cp_silent)
cp_thing ((errorfn *) error_with_file_and_line, 1, format, ap);
va_end (ap);
}
DECLARE (cp_warning_at)
void
cp_warning_at VPROTO((const char *format, ...))
{
#ifndef ANSI_PROTOTYPES
char *format;
#endif
va_list ap;
INIT;
VA_START (ap, format);
#ifndef ANSI_PROTOTYPES
format = va_arg (ap, char *);
#endif
if (! cp_silent)
cp_thing ((errorfn *) warning_with_file_and_line, 1, format, ap);
va_end (ap);
}
DECLARE (cp_pedwarn_at)
void
cp_pedwarn_at VPROTO((const char *format, ...))
{
#ifndef ANSI_PROTOTYPES
char *format;
#endif
va_list ap;
INIT;
VA_START (ap, format);
#ifndef ANSI_PROTOTYPES
format = va_arg (ap, char *);
#endif
if (! cp_silent)
cp_thing ((errorfn *) pedwarn_with_file_and_line, 1, format, ap);
va_end (ap);
......
/* Handle the hair of processing (but not expanding) inline functions.
Also manage function and variable name overloading.
Copyright (C) 1987, 89, 92-97, 1998 Free Software Foundation, Inc.
Copyright (C) 1987, 89, 92-97, 1998, 1999 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com)
This file is part of GNU CC.
......@@ -1201,7 +1201,8 @@ build_mangled_name (parmtypes, begin, end)
return (char *)obstack_base (&scratch_obstack);
}
/* handles emitting modifiers such as Constant, read-only, and volatile */
/* Emit modifiers such as constant, read-only, and volatile. */
void
process_modifiers (parmtype)
tree parmtype;
......@@ -1212,6 +1213,8 @@ process_modifiers (parmtype)
if (TYPE_READONLY (parmtype))
OB_PUTC ('C');
if (TREE_CODE (parmtype) == INTEGER_TYPE
&& parmtype != char_type_node
&& parmtype != wchar_type_node
&& (TYPE_MAIN_VARIANT (parmtype)
== unsigned_type (TYPE_MAIN_VARIANT (parmtype)))
&& ! TYPE_FOR_JAVA (parmtype))
......@@ -1267,7 +1270,8 @@ check_btype (type)
return 0;
}
/* handle emitting the correct code for various node types */
/* Emit the correct code for various node types. */
static void
process_overload_item (parmtype, extra_Gcode)
tree parmtype;
......@@ -1275,9 +1279,9 @@ process_overload_item (parmtype, extra_Gcode)
{
numeric_output_need_bar = 0;
/* These tree types are considered modifiers for B code squangling , */
/* and therefore should not get entries in the Btypelist */
/* they are, however, repeatable types */
/* These tree types are considered modifiers for B code squangling,
and therefore should not get entries in the Btypelist. They are,
however, repeatable types. */
switch (TREE_CODE (parmtype))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment