diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1055cb1686c..f541f0a0fd1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,16 @@ +2000-01-18 Kaveh R. Ghazi + + * vax-protos.h: New file. + + * vax.c: Fix compile time warnings. + + * vax.h: Move prototypes to vax-protos.h. Fix compile time + warnings. + + * vax.md: Likewise. + + * vaxv.md: Likewise. + 2000-01-18 Kaveh R. Ghazi * romp-protos.h: New file. diff --git a/gcc/config/vax/vax-protos.h b/gcc/config/vax/vax-protos.h new file mode 100644 index 00000000000..f770871957f --- /dev/null +++ b/gcc/config/vax/vax-protos.h @@ -0,0 +1,38 @@ +/* Definitions of target machine for GNU compiler. Vax version. + Copyright (C) 2000 Free Software Foundation, Inc. + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +#ifdef RTX_CODE +extern const char *rev_cond_name PARAMS ((rtx)); +extern void split_quadword_operands PARAMS ((rtx *, rtx *, int)); +extern void print_operand_address PARAMS ((FILE *, rtx)); +extern int vax_float_literal PARAMS ((rtx)); +extern int vax_address_cost PARAMS ((rtx)); +extern int vax_rtx_cost PARAMS ((rtx)); +#endif /* RTX_CODE */ + +#ifdef REAL_VALUE_TYPE +extern int check_float_value PARAMS ((enum machine_mode, REAL_VALUE_TYPE *, int)); +#endif /* REAL_VALUE_TYPE */ + +#ifdef TREE_CODE +extern void vms_check_external PARAMS ((tree, const char *, int)); +#endif /* TREE_CODE */ + +extern void vms_flush_pending_externals PARAMS ((FILE *)); diff --git a/gcc/config/vax/vax.c b/gcc/config/vax/vax.c index 9eab182b80e..1ccc3eb7b6a 100644 --- a/gcc/config/vax/vax.c +++ b/gcc/config/vax/vax.c @@ -1,5 +1,5 @@ /* Subroutines for insn-output.c for Vax. - Copyright (C) 1987, 94, 95, 97, 98, 1999 Free Software Foundation, Inc. + Copyright (C) 1987, 94, 95, 97-99, 2000 Free Software Foundation, Inc. This file is part of GNU CC. @@ -33,13 +33,14 @@ Boston, MA 02111-1307, USA. */ #ifdef VMS_TARGET #include "tree.h" #endif +#include "tm_p.h" /* This is like nonimmediate_operand with a restriction on the type of MEM. */ void split_quadword_operands (operands, low, n) rtx *operands, *low; - int n; + int n ATTRIBUTE_UNUSED; { int i; /* Split operands. */ @@ -68,11 +69,12 @@ split_quadword_operands (operands, low, n) } } +void print_operand_address (file, addr) FILE *file; register rtx addr; { - register rtx reg1, reg2, breg, ireg; + register rtx reg1, breg, ireg; rtx offset; retry: @@ -250,7 +252,7 @@ print_operand_address (file, addr) } } -char * +const char * rev_cond_name (op) rtx op; { @@ -287,8 +289,10 @@ vax_float_literal(c) register rtx c; { register enum machine_mode mode; +#if HOST_FLOAT_FORMAT == VAX_FLOAT_FORMAT int i; union {double d; int i[2];} val; +#endif if (GET_CODE (c) != CONST_DOUBLE) return 0; @@ -324,7 +328,8 @@ vax_float_literal(c) 2 - indirect */ -int vax_address_cost(addr) +int +vax_address_cost (addr) register rtx addr; { int reg = 0, indexed = 0, indir = 0, offset = 0, predec = 0; @@ -366,6 +371,8 @@ int vax_address_cost(addr) indir = 2; /* 3 on VAX 2 */ addr = XEXP (addr, 0); goto restart; + default: + break; } /* Up to 3 things can be added in an address. They are stored in @@ -428,6 +435,8 @@ vax_rtx_cost (x) case QImode: c = 10; /* 3-4 on VAX 9000, 20-28 on VAX 2 */ break; + default: + break; } break; case UDIV: @@ -583,7 +592,7 @@ vax_rtx_cost (x) /* Check a `double' value for validity for a particular machine mode. */ -static char *float_strings[] = +static const char *const float_strings[] = { "1.70141173319264430e+38", /* 2^127 (2^24 - 1) / 2^24 */ "-1.70141173319264430e+38", @@ -662,7 +671,7 @@ check_float_value (mode, d, overflow) static struct extern_list { struct extern_list *next; /* next external */ - char *name; /* name of the external */ + const char *name; /* name of the external */ int size; /* external's actual size */ int in_const; /* section type flag */ } *extern_head = 0, *pending_head = 0; @@ -673,7 +682,7 @@ struct extern_list { void vms_check_external (decl, name, pending) tree decl; - char *name; + const char *name; int pending; { register struct extern_list *p, *p0; diff --git a/gcc/config/vax/vax.h b/gcc/config/vax/vax.h index 35f3fbdc0e7..db61a50a52b 100644 --- a/gcc/config/vax/vax.h +++ b/gcc/config/vax/vax.h @@ -1,5 +1,5 @@ /* Definitions of target machine for GNU compiler. Vax version. - Copyright (C) 1987, 88, 91, 93-98, 1999 Free Software Foundation, Inc. + Copyright (C) 1987, 88, 91, 93-99, 2000 Free Software Foundation, Inc. This file is part of GNU CC. @@ -258,7 +258,7 @@ enum reg_class { NO_REGS, ALL_REGS, LIM_REG_CLASSES }; This is an initializer for a vector of HARD_REG_SET of length N_REG_CLASSES. */ -#define REG_CLASS_CONTENTS {0, 0xffff} +#define REG_CLASS_CONTENTS {{0}, {0xffff}} /* The same information, inverted: Return the class number of the smallest class containing @@ -1270,8 +1270,7 @@ VAX operand formatting codes: ((CODE) == '#') #define PRINT_OPERAND(FILE, X, CODE) \ -{ extern char *rev_cond_name (); \ - if (CODE == '#') fputc (ASM_DOUBLE_CHAR, FILE); \ +{ if (CODE == '#') fputc (ASM_DOUBLE_CHAR, FILE); \ else if (CODE == 'C') \ fputs (rev_cond_name (X), FILE); \ else if (CODE == 'D' && GET_CODE (X) == CONST_INT && INTVAL (X) < 0) \ diff --git a/gcc/config/vax/vax.md b/gcc/config/vax/vax.md index 0f48a314415..9097b1cc9da 100644 --- a/gcc/config/vax/vax.md +++ b/gcc/config/vax/vax.md @@ -1,5 +1,5 @@ ;; Machine description for GNU compiler, Vax Version -;; Copyright (C) 1987, 88, 91, 94-96, 1998, 1999 Free Software Foundation, Inc. +;; Copyright (C) 1987, 88, 91, 94-96, 98, 99, 2000 Free Software Foundation, Inc. ;; This file is part of GNU CC. @@ -662,7 +662,7 @@ "* { rtx low[3]; - char *pattern; + const char *pattern; int carry = 1; split_quadword_operands (operands, low, 3); @@ -753,7 +753,7 @@ "* { rtx low[3]; - char *pattern; + const char *pattern; int carry = 1; split_quadword_operands (operands, low, 3); diff --git a/gcc/config/vax/vaxv.h b/gcc/config/vax/vaxv.h index 57dff406b91..ed61d23b8bf 100644 --- a/gcc/config/vax/vaxv.h +++ b/gcc/config/vax/vaxv.h @@ -1,5 +1,5 @@ /* Definitions of target machine for GNU compiler. Vax sysV version. - Copyright (C) 1988, 1993, 1996 Free Software Foundation, Inc. + Copyright (C) 1988, 1993, 1996, 2000 Free Software Foundation, Inc. This file is part of GNU CC. @@ -51,7 +51,7 @@ output_file_directive ((FILE), main_input_filename) #define ASM_OUTPUT_ASCII(FILE,PTR,LEN) \ do { \ - unsigned char *s; \ + const unsigned char *s; \ int i; \ for (i = 0, s = (PTR); i < (LEN); s++, i++) \ { \