summaryrefslogtreecommitdiff
path: root/gcc/read-rtl.c
diff options
context:
space:
mode:
authoraj <aj@138bc75d-0d04-0410-961f-82ee72b054a4>2003-07-06 09:56:09 +0000
committeraj <aj@138bc75d-0d04-0410-961f-82ee72b054a4>2003-07-06 09:56:09 +0000
commit3ad4992fcd7ff7630590475a58eb6bc739e60888 (patch)
tree4fb7a1aaa85c3c4aeda23d46346034b73d069df2 /gcc/read-rtl.c
parent9aa3a6fa9648268ce13ad83da01c625d7fff695f (diff)
downloadlinaro-gcc-3ad4992fcd7ff7630590475a58eb6bc739e60888.tar.gz
linaro-gcc-3ad4992fcd7ff7630590475a58eb6bc739e60888.tar.bz2
linaro-gcc-3ad4992fcd7ff7630590475a58eb6bc739e60888.zip
* jump.c: Convert prototypes to ISO C90.
* langhooks-def.h: Likewise. Add extern to prototypes. * langhooks.c: Likewise. * langhooks.h: Likewise. * lcm.c: Likewise. * local-alloc.c: Likewise. * loop-init.c: Likewise. * loop-unroll.c: Likewise. * loop-unswitch.c: Likewise. * loop.c: Likewise. * loop.h: Likewise. Add extern to prototypes. * machmode.h: Likewise. * main.c: Likewise. * mbchar.c: Likewise. * mbchar.h: Likewise. * mkdeps.c: Likewise. * mkdeps.h: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * output.h: Likewise. * gccspec.c: Likwise. * postreload.c: Likewise. * prefix.c: Likewise. * prefix.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * real.h: Likewise. * recog.c: Likewise. * recog.h: Likewise. * reg-stack.c: Likewise. * regclass.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * reload.c: Likewise. * reload.h: Likewise. * reload1.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * resource.h: Likewise. * rtl-error.c: Likewise. * rtl.c: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68998 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/read-rtl.c')
-rw-r--r--gcc/read-rtl.c81
1 files changed, 29 insertions, 52 deletions
diff --git a/gcc/read-rtl.c b/gcc/read-rtl.c
index 9d08da4c94c..629390997c2 100644
--- a/gcc/read-rtl.c
+++ b/gcc/read-rtl.c
@@ -1,5 +1,6 @@
/* RTL reader for GCC.
- Copyright (C) 1987, 1988, 1991, 1994, 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright (C) 1987, 1988, 1991, 1994, 1997, 1998, 1999, 2000, 2001, 2002,
+ 2003
Free Software Foundation, Inc.
This file is part of GCC.
@@ -29,18 +30,18 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
static htab_t md_constants;
-static void fatal_with_file_and_line PARAMS ((FILE *, const char *, ...))
+static void fatal_with_file_and_line (FILE *, const char *, ...)
ATTRIBUTE_PRINTF_2 ATTRIBUTE_NORETURN;
-static void fatal_expected_char PARAMS ((FILE *, int, int)) ATTRIBUTE_NORETURN;
-static void read_name PARAMS ((char *, FILE *));
-static char *read_string PARAMS ((struct obstack *, FILE *, int));
-static char *read_quoted_string PARAMS ((struct obstack *, FILE *));
-static char *read_braced_string PARAMS ((struct obstack *, FILE *));
-static void read_escape PARAMS ((struct obstack *, FILE *));
-static hashval_t def_hash PARAMS ((const void *));
-static int def_name_eq_p PARAMS ((const void *, const void *));
-static void read_constants PARAMS ((FILE *infile, char *tmp_char));
-static void validate_const_int PARAMS ((FILE *, const char *));
+static void fatal_expected_char (FILE *, int, int) ATTRIBUTE_NORETURN;
+static void read_name (char *, FILE *);
+static char *read_string (struct obstack *, FILE *, int);
+static char *read_quoted_string (struct obstack *, FILE *);
+static char *read_braced_string (struct obstack *, FILE *);
+static void read_escape (struct obstack *, FILE *);
+static hashval_t def_hash (const void *);
+static int def_name_eq_p (const void *, const void *);
+static void read_constants (FILE *infile, char *tmp_char);
+static void validate_const_int (FILE *, const char *);
/* Subroutines of read_rtx. */
@@ -87,9 +88,7 @@ fatal_with_file_and_line (FILE *infile, const char *msg, ...)
invalid data. */
static void
-fatal_expected_char (infile, expected_c, actual_c)
- FILE *infile;
- int expected_c, actual_c;
+fatal_expected_char (FILE *infile, int expected_c, int actual_c)
{
fatal_with_file_and_line (infile, "expected character `%c', found `%c'",
expected_c, actual_c);
@@ -101,8 +100,7 @@ fatal_expected_char (infile, expected_c, actual_c)
Tools such as genflags use this function. */
int
-read_skip_spaces (infile)
- FILE *infile;
+read_skip_spaces (FILE *infile)
{
int c;
@@ -154,9 +152,7 @@ read_skip_spaces (infile)
It is terminated by any of the punctuation chars of rtx printed syntax. */
static void
-read_name (str, infile)
- char *str;
- FILE *infile;
+read_name (char *str, FILE *infile)
{
char *p;
int c;
@@ -207,9 +203,7 @@ read_name (str, infile)
/* Subroutine of the string readers. Handles backslash escapes.
Caller has read the backslash, but not placed it into the obstack. */
static void
-read_escape (ob, infile)
- struct obstack *ob;
- FILE *infile;
+read_escape (struct obstack *ob, FILE *infile)
{
int c = getc (infile);
@@ -262,9 +256,7 @@ read_escape (ob, infile)
/* Read a double-quoted string onto the obstack. Caller has scanned
the leading quote. */
static char *
-read_quoted_string (ob, infile)
- struct obstack *ob;
- FILE *infile;
+read_quoted_string (struct obstack *ob, FILE *infile)
{
int c;
@@ -292,9 +284,7 @@ read_quoted_string (ob, infile)
scanned the leading brace. Note that unlike quoted strings,
the outermost braces _are_ included in the string constant. */
static char *
-read_braced_string (ob, infile)
- struct obstack *ob;
- FILE *infile;
+read_braced_string (struct obstack *ob, FILE *infile)
{
int c;
int brace_depth = 1; /* caller-processed */
@@ -319,7 +309,7 @@ read_braced_string (ob, infile)
else if (c == EOF)
fatal_with_file_and_line
(infile, "missing closing } for opening brace on line %lu",
- starting_read_rtx_lineno);
+ starting_read_rtx_lineno);
obstack_1grow (ob, c);
}
@@ -333,10 +323,7 @@ read_braced_string (ob, infile)
and dispatch to the appropriate string constant reader. */
static char *
-read_string (ob, infile, star_if_braced)
- struct obstack *ob;
- FILE *infile;
- int star_if_braced;
+read_string (struct obstack *ob, FILE *infile, int star_if_braced)
{
char *stringbuf;
int saw_paren = 0;
@@ -373,11 +360,10 @@ read_string (ob, infile, star_if_braced)
/* Provide a version of a function to read a long long if the system does
not provide one. */
#if HOST_BITS_PER_WIDE_INT > HOST_BITS_PER_LONG && !defined(HAVE_ATOLL) && !defined(HAVE_ATOQ)
-HOST_WIDE_INT atoll PARAMS ((const char *));
+HOST_WIDE_INT atoll (const char *);
HOST_WIDE_INT
-atoll (p)
- const char *p;
+atoll (const char *p)
{
int neg = 0;
HOST_WIDE_INT tmp_wide;
@@ -411,8 +397,7 @@ atoll (p)
/* Given a constant definition, return a hash code for its name. */
static hashval_t
-def_hash (def)
- const void *def;
+def_hash (const void *def)
{
unsigned result, i;
const char *string = ((const struct md_constant *) def)->name;
@@ -424,8 +409,7 @@ def_hash (def)
/* Given two constant definitions, return true if they have the same name. */
static int
-def_name_eq_p (def1, def2)
- const void *def1, *def2;
+def_name_eq_p (const void *def1, const void *def2)
{
return ! strcmp (((const struct md_constant *) def1)->name,
((const struct md_constant *) def2)->name);
@@ -435,9 +419,7 @@ def_name_eq_p (def1, def2)
to read a name or number into. Process a define_constants directive,
starting with the optional space after the "define_constants". */
static void
-read_constants (infile, tmp_char)
- FILE *infile;
- char *tmp_char;
+read_constants (FILE *infile, char *tmp_char)
{
int c;
htab_t defs;
@@ -493,18 +475,14 @@ read_constants (infile, tmp_char)
a pointer a pointer to the constant definition and INFO.
Stops when CALLBACK returns zero. */
void
-traverse_md_constants (callback, info)
- htab_trav callback;
- void *info;
+traverse_md_constants (htab_trav callback, void *info)
{
if (md_constants)
htab_traverse (md_constants, callback, info);
}
static void
-validate_const_int (infile, string)
- FILE *infile;
- const char *string;
+validate_const_int (FILE *infile, const char *string)
{
const char *cp;
int valid = 1;
@@ -529,8 +507,7 @@ validate_const_int (infile, string)
the utilities gen*.c that construct C code from machine descriptions. */
rtx
-read_rtx (infile)
- FILE *infile;
+read_rtx (FILE *infile)
{
int i, j;
RTX_CODE tmp_code;