Commit a5c24926 by Richard Henderson Committed by Richard Henderson

alpha-protos.h, [...]: Update to ISO C.

        * config/alpha/alpha-protos.h, config/alpha/elf.h,
        config/alpha/osf.h, config/alpha/unicosmk.h, config/alpha/vms.h,
        config/alpha/vms-cc.c, config/alpha/vms-ld.c: Update to ISO C.
        * config/alpha/alpha.c: Likewise.  Move targetm init to end of file.
        Remove unneeded static function decls.

From-SVN: r68000
parent 7b086b11
2003-06-16 Richard Henderson <rth@redhat.com>
* config/alpha/alpha-protos.h, config/alpha/elf.h,
config/alpha/osf.h, config/alpha/unicosmk.h, config/alpha/vms.h,
config/alpha/vms-cc.c, config/alpha/vms-ld.c: Update to ISO C.
* config/alpha/alpha.c: Likewise. Move targetm init to end of file.
Remove unneeded static function decls.
2003-06-16 Neil Booth <neil@daikokuya.co.uk> 2003-06-16 Neil Booth <neil@daikokuya.co.uk>
* c-opts.c (c_common_handle_option): s/on/value/. * c-opts.c (c_common_handle_option): s/on/value/.
......
...@@ -231,8 +231,8 @@ do { \ ...@@ -231,8 +231,8 @@ do { \
SECTION_FUNCTION_TEMPLATE(sbss_section, in_sbss, SBSS_SECTION_ASM_OP) \ SECTION_FUNCTION_TEMPLATE(sbss_section, in_sbss, SBSS_SECTION_ASM_OP) \
SECTION_FUNCTION_TEMPLATE(sdata_section, in_sdata, SDATA_SECTION_ASM_OP) SECTION_FUNCTION_TEMPLATE(sdata_section, in_sdata, SDATA_SECTION_ASM_OP)
extern void sbss_section PARAMS ((void)); extern void sbss_section (void);
extern void sdata_section PARAMS ((void)); extern void sdata_section (void);
#undef SECTION_FUNCTION_TEMPLATE #undef SECTION_FUNCTION_TEMPLATE
#define SECTION_FUNCTION_TEMPLATE(FN, ENUM, OP) \ #define SECTION_FUNCTION_TEMPLATE(FN, ENUM, OP) \
......
...@@ -155,13 +155,10 @@ Boston, MA 02111-1307, USA. */ ...@@ -155,13 +155,10 @@ Boston, MA 02111-1307, USA. */
/* Attempt to turn on access permissions for the stack. */ /* Attempt to turn on access permissions for the stack. */
#define TRANSFER_FROM_TRAMPOLINE \ #define TRANSFER_FROM_TRAMPOLINE \
extern void __enable_execute_stack PARAMS ((void *)); \
\
void \ void \
__enable_execute_stack (addr) \ __enable_execute_stack (void *addr) \
void *addr; \
{ \ { \
extern int mprotect PARAMS ((const void *, size_t, int)); \ extern int mprotect (const void *, size_t, int); \
long size = getpagesize (); \ long size = getpagesize (); \
long mask = ~(size-1); \ long mask = ~(size-1); \
char *page = (char *) (((long) addr) & mask); \ char *page = (char *) (((long) addr) & mask); \
......
...@@ -102,8 +102,6 @@ Boston, MA 02111-1307, USA. */ ...@@ -102,8 +102,6 @@ Boston, MA 02111-1307, USA. */
other its replacement, at the start of a routine. This is somewhat other its replacement, at the start of a routine. This is somewhat
complicated on the T3E which is why we use a function. */ complicated on the T3E which is why we use a function. */
extern int unicosmk_initial_elimination_offset PARAMS ((int, int));
#undef INITIAL_ELIMINATION_OFFSET #undef INITIAL_ELIMINATION_OFFSET
#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \ #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
do { \ do { \
...@@ -319,7 +317,7 @@ do { fprintf (FILE, "\tbr $1,0\n"); \ ...@@ -319,7 +317,7 @@ do { fprintf (FILE, "\tbr $1,0\n"); \
COMMON_SECTION \ COMMON_SECTION \
SSIB_SECTION SSIB_SECTION
extern void common_section PARAMS ((void)); extern void common_section (void);
#define COMMON_SECTION \ #define COMMON_SECTION \
void \ void \
common_section () \ common_section () \
...@@ -327,7 +325,7 @@ common_section () \ ...@@ -327,7 +325,7 @@ common_section () \
in_section = in_common; \ in_section = in_common; \
} }
extern void ssib_section PARAMS ((void)); extern void ssib_section (void);
#define SSIB_SECTION \ #define SSIB_SECTION \
void \ void \
ssib_section () \ ssib_section () \
......
/* VMS DEC C wrapper. /* VMS DEC C wrapper.
Copyright (C) 2001 Free Software Foundation, Inc. Copyright (C) 2001, 2003 Free Software Foundation, Inc.
Contributed by Douglas B. Rupp (rupp@gnat.com). Contributed by Douglas B. Rupp (rupp@gnat.com).
This file is part of GNU CC. This file is part of GNU CC.
...@@ -34,50 +34,47 @@ Boston, MA 02111-1307, USA. */ ...@@ -34,50 +34,47 @@ Boston, MA 02111-1307, USA. */
#define PATH_SEPARATOR_STR "," #define PATH_SEPARATOR_STR ","
/* These can be set by command line arguments */ /* These can be set by command line arguments */
int verbose = 0; static int verbose = 0;
int save_temps = 0; static int save_temps = 0;
int comp_arg_max = -1; static int comp_arg_max = -1;
const char **comp_args = 0; static const char **comp_args = 0;
int comp_arg_index = -1; static int comp_arg_index = -1;
char *objfilename = 0; static char *objfilename = 0;
char *system_search_dirs = (char *) ""; static char *system_search_dirs = (char *) "";
char *search_dirs; static char *search_dirs;
char *default_defines = (char *) ""; static char *default_defines = (char *) "";
char *defines; static char *defines;
/* Translate a Unix syntax directory specification into VMS syntax. /* Translate a Unix syntax directory specification into VMS syntax.
If indicators of VMS syntax found, return input string. */ If indicators of VMS syntax found, return input string. */
static char *to_host_dir_spec PARAMS ((char *)); static char *to_host_dir_spec (char *);
/* Translate a Unix syntax file specification into VMS syntax. /* Translate a Unix syntax file specification into VMS syntax.
If indicators of VMS syntax found, return input string. */ If indicators of VMS syntax found, return input string. */
static char *to_host_file_spec PARAMS ((char *)); static char *to_host_file_spec (char *);
/* Add a translated arg to the list to be passed to DEC CC */ /* Add a translated arg to the list to be passed to DEC CC */
static void addarg PARAMS ((const char *)); static void addarg (const char *);
/* Preprocess the number of args in P_ARGC and contained in ARGV. /* Preprocess the number of args in P_ARGC and contained in ARGV.
Look for special flags, etc. that must be handled first. */ Look for special flags, etc. that must be handled first. */
static void preprocess_args PARAMS ((int *, char **)); static void preprocess_args (int *, char **);
/* Process the number of args in P_ARGC and contained in ARGV. Look /* Process the number of args in P_ARGC and contained in ARGV. Look
for special flags, etc. that must be handled for the VMS compiler. */ for special flags, etc. that must be handled for the VMS compiler. */
static void process_args PARAMS ((int *, char **)); static void process_args (int *, char **);
/* Action routine called by decc$to_vms */ /* Action routine called by decc$to_vms */
static int translate_unix PARAMS ((char *, int)); static int translate_unix (char *, int);
int main PARAMS ((int, char **));
/* Add the argument contained in STR to the list of arguments to pass to the /* Add the argument contained in STR to the list of arguments to pass to the
compiler. */ compiler. */
static void static void
addarg (str) addarg (const char *str)
const char *str;
{ {
int i; int i;
...@@ -100,9 +97,7 @@ addarg (str) ...@@ -100,9 +97,7 @@ addarg (str)
} }
static void static void
preprocess_args (p_argc, argv) preprocess_args (int *p_argc, char *argv[])
int *p_argc;
char *argv[];
{ {
int i; int i;
...@@ -122,9 +117,7 @@ preprocess_args (p_argc, argv) ...@@ -122,9 +117,7 @@ preprocess_args (p_argc, argv)
} }
static void static void
process_args (p_argc, argv) process_args (int *p_argc, char *argv[])
int *p_argc;
char *argv[];
{ {
int i; int i;
...@@ -185,9 +178,7 @@ process_args (p_argc, argv) ...@@ -185,9 +178,7 @@ process_args (p_argc, argv)
typedef struct dsc {unsigned short len, mbz; char *adr; } Descr; typedef struct dsc {unsigned short len, mbz; char *adr; } Descr;
int int
main (argc, argv) main (int argc, char **argv)
int argc;
char **argv;
{ {
int i; int i;
char cwdev [128], *devptr; char cwdev [128], *devptr;
...@@ -320,17 +311,14 @@ static char new_host_dirspec [255]; ...@@ -320,17 +311,14 @@ static char new_host_dirspec [255];
static char filename_buff [256]; static char filename_buff [256];
static int static int
translate_unix (name, type) translate_unix (char *name, int type ATTRIBUTE_UNUSED)
char *name;
int type ATTRIBUTE_UNUSED;
{ {
strcpy (filename_buff, name); strcpy (filename_buff, name);
return 0; return 0;
} }
static char * static char *
to_host_dir_spec (dirspec) to_host_dir_spec (char *dirspec)
char *dirspec;
{ {
int len = strlen (dirspec); int len = strlen (dirspec);
...@@ -353,8 +341,7 @@ to_host_dir_spec (dirspec) ...@@ -353,8 +341,7 @@ to_host_dir_spec (dirspec)
} }
static char * static char *
to_host_file_spec (filespec) to_host_file_spec (char *filespec)
char *filespec;
{ {
strcpy (new_host_filespec, ""); strcpy (new_host_filespec, "");
if (strchr (filespec, ']') || strchr (filespec, ':')) if (strchr (filespec, ']') || strchr (filespec, ':'))
......
/* VMS linker wrapper. /* VMS linker wrapper.
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc. Free Software Foundation, Inc.
Contributed by Douglas B. Rupp (rupp@gnat.com). Contributed by Douglas B. Rupp (rupp@gnat.com).
...@@ -89,39 +89,38 @@ static char *search_dirs; ...@@ -89,39 +89,38 @@ static char *search_dirs;
/* Add STR to the list of arguments to pass to the linker. Expand the list as /* Add STR to the list of arguments to pass to the linker. Expand the list as
necessary to accommodate. */ necessary to accommodate. */
static void addarg PARAMS ((const char *)); static void addarg (const char *);
/* Check to see if NAME is a regular file, i.e. not a directory */ /* Check to see if NAME is a regular file, i.e. not a directory */
static int is_regular_file PARAMS ((char *)); static int is_regular_file (char *);
/* Translate a Unix syntax file specification FILESPEC into VMS syntax. /* Translate a Unix syntax file specification FILESPEC into VMS syntax.
If indicators of VMS syntax found, return input string. */ If indicators of VMS syntax found, return input string. */
static char *to_host_file_spec PARAMS ((char *)); static char *to_host_file_spec (char *);
/* Locate the library named LIB_NAME in the set of paths PATH_VAL. */ /* Locate the library named LIB_NAME in the set of paths PATH_VAL. */
static char *locate_lib PARAMS ((char *, char *)); static char *locate_lib (char *, char *);
/* Given a library name NAME, i.e. foo, Look for libfoo.lib and then /* Given a library name NAME, i.e. foo, Look for libfoo.lib and then
libfoo.a in the set of directories we are allowed to search in. */ libfoo.a in the set of directories we are allowed to search in. */
static const char *expand_lib PARAMS ((char *)); static const char *expand_lib (char *);
/* Preprocess the number of args P_ARGC in ARGV. /* Preprocess the number of args P_ARGC in ARGV.
Look for special flags, etc. that must be handled first. */ Look for special flags, etc. that must be handled first. */
static void preprocess_args PARAMS ((int *, char **)); static void preprocess_args (int *, char **);
/* Preprocess the number of args P_ARGC in ARGV. Look for /* Preprocess the number of args P_ARGC in ARGV. Look for
special flags, etc. that must be handled for the VMS linker. */ special flags, etc. that must be handled for the VMS linker. */
static void process_args PARAMS ((int *, char **)); static void process_args (int *, char **);
/* Action routine called by decc$to_vms. NAME is a file name or /* Action routine called by decc$to_vms. NAME is a file name or
directory name. TYPE is unused. */ directory name. TYPE is unused. */
static int translate_unix PARAMS ((char *, int)); static int translate_unix (char *, int);
int main PARAMS ((int, char **)); int main (int, char **);
static void static void
addarg (str) addarg (const char *str)
const char *str;
{ {
int i; int i;
...@@ -144,9 +143,7 @@ addarg (str) ...@@ -144,9 +143,7 @@ addarg (str)
} }
static char * static char *
locate_lib (lib_name, path_val) locate_lib (char *lib_name, char *path_val)
char *lib_name;
char *path_val;
{ {
int lib_len = strlen (lib_name); int lib_len = strlen (lib_name);
char *eptr, *sptr; char *eptr, *sptr;
...@@ -206,8 +203,7 @@ locate_lib (lib_name, path_val) ...@@ -206,8 +203,7 @@ locate_lib (lib_name, path_val)
} }
static const char * static const char *
expand_lib (name) expand_lib (char *name)
char *name;
{ {
char *lib, *lib_path; char *lib, *lib_path;
...@@ -240,8 +236,7 @@ expand_lib (name) ...@@ -240,8 +236,7 @@ expand_lib (name)
} }
static int static int
is_regular_file (name) is_regular_file (char *name)
char *name;
{ {
int ret; int ret;
struct stat statbuf; struct stat statbuf;
...@@ -251,9 +246,7 @@ is_regular_file (name) ...@@ -251,9 +246,7 @@ is_regular_file (name)
} }
static void static void
preprocess_args (p_argc, argv) preprocess_args (int *p_argc, char **argv)
int *p_argc;
char **argv;
{ {
int i; int i;
...@@ -305,9 +298,7 @@ preprocess_args (p_argc, argv) ...@@ -305,9 +298,7 @@ preprocess_args (p_argc, argv)
} }
static void static void
process_args (p_argc, argv) process_args (int *p_argc, char **argv)
int *p_argc;
char **argv;
{ {
int i; int i;
...@@ -381,9 +372,7 @@ process_args (p_argc, argv) ...@@ -381,9 +372,7 @@ process_args (p_argc, argv)
and args to be what the VMS linker wants. */ and args to be what the VMS linker wants. */
int int
main (argc, argv) main (int argc, char **argv)
int argc;
char **argv;
{ {
int i; int i;
char cwdev [128], *devptr; char cwdev [128], *devptr;
...@@ -753,17 +742,14 @@ static char new_host_filespec [255]; ...@@ -753,17 +742,14 @@ static char new_host_filespec [255];
static char filename_buff [256]; static char filename_buff [256];
static int static int
translate_unix (name, type) translate_unix (char *name, int type ATTRIBUTE_UNUSED)
char *name;
int type ATTRIBUTE_UNUSED;
{ {
strcpy (filename_buff, name); strcpy (filename_buff, name);
return 0; return 0;
} }
static char * static char *
to_host_file_spec (filespec) to_host_file_spec (char *filespec)
char *filespec;
{ {
strcpy (new_host_filespec, ""); strcpy (new_host_filespec, "");
if (strchr (filespec, ']') || strchr (filespec, ':')) if (strchr (filespec, ']') || strchr (filespec, ':'))
......
...@@ -287,8 +287,8 @@ literals_section () \ ...@@ -287,8 +287,8 @@ literals_section () \
} \ } \
} }
extern void link_section PARAMS ((void)); extern void link_section (void);
extern void literals_section PARAMS ((void)); extern void literals_section (void);
#undef ASM_OUTPUT_ADDR_DIFF_ELT #undef ASM_OUTPUT_ADDR_DIFF_ELT
#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) abort () #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) abort ()
......
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