diff options
author | aj <aj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-01-26 14:40:22 +0000 |
---|---|---|
committer | aj <aj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-01-26 14:40:22 +0000 |
commit | 06b9f7dcf9ff90ad68b7799ee8afe85374c1bf06 (patch) | |
tree | 1ad40e789d391d8f3140aebb5c259c027424f6a7 | |
parent | befaf436af84ed695be33782d7eb5daa67394583 (diff) | |
download | gcc-06b9f7dcf9ff90ad68b7799ee8afe85374c1bf06.tar.gz |
2003-01-26 Steven Bosscher <s.bosscher@student.tudelft.nl>
* config/avr/avr.h, config/cris/aout.h, config/elfos.h,
config/i386/freebsd-aout.h, config/mips/iris6.h: Undefine
ASM_FINISH_DECLARE_OBJECT before defining it.
* toplev.c (rest_of_decl_compilation): Don't define
ASM_FINISH_DECLARE_OBJECT. Only use it if it is defined.
(rest_of_type_compilation): Don't ATTRIBUTE_UNUSED function
parameters for DWARF2 targets because they _are_ used.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61851 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/config/avr/avr.h | 39 | ||||
-rw-r--r-- | gcc/config/cris/aout.h | 31 | ||||
-rw-r--r-- | gcc/config/elfos.h | 33 | ||||
-rw-r--r-- | gcc/config/i386/freebsd-aout.h | 3 | ||||
-rw-r--r-- | gcc/config/mips/iris6.h | 1 | ||||
-rw-r--r-- | gcc/toplev.c | 14 |
7 files changed, 71 insertions, 60 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fa5745c4cf3..6960af93c64 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2003-01-26 Steven Bosscher <s.bosscher@student.tudelft.nl> + + * config/avr/avr.h, config/cris/aout.h, config/elfos.h, + config/i386/freebsd-aout.h, config/mips/iris6.h: Undefine + ASM_FINISH_DECLARE_OBJECT before defining it. + * toplev.c (rest_of_decl_compilation): Don't define + ASM_FINISH_DECLARE_OBJECT. Only use it if it is defined. + (rest_of_type_compilation): Don't ATTRIBUTE_UNUSED function + parameters for DWARF2 targets because they _are_ used. + 2003-01-26 Alexandre Oliva <aoliva@redhat.com> * fp-bit.h: Define macros for TFmode floating-point constants diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h index 4dcef89b91e..5309a0d5878 100644 --- a/gcc/config/avr/avr.h +++ b/gcc/config/avr/avr.h @@ -1,6 +1,6 @@ /* Definitions of target machine for GNU compiler, for ATMEL AVR at90s8515, ATmega103/103L, ATmega603/603L microcontrollers. - Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Denis Chertykov (denisc@overta.ru) This file is part of GNU CC. @@ -22,7 +22,7 @@ Boston, MA 02111-1307, USA. */ /* Names to predefine in the preprocessor for this target machine. */ -#define TARGET_CPU_CPP_BUILTINS() \ +#define TARGET_CPU_CPP_BUILTINS() \ do \ { \ builtin_define_std ("AVR"); \ @@ -58,7 +58,7 @@ extern int target_flags; #define TARGET_ORDER_1 (target_flags & MASK_ORDER_1) #define TARGET_ORDER_2 (target_flags & MASK_ORDER_2) -#define TARGET_INT8 (target_flags & MASK_INT8) +#define TARGET_INT8 (target_flags & MASK_INT8) #define TARGET_NO_INTERRUPTS (target_flags & MASK_NO_INTERRUPTS) #define TARGET_INSN_SIZE_DUMP (target_flags & MASK_INSN_SIZE_DUMP) #define TARGET_CALL_PROLOGUES (target_flags & MASK_CALL_PROLOGUES) @@ -70,7 +70,7 @@ extern int target_flags; This is for debugging the compiler itself. */ #define TARGET_RTL_DUMP (target_flags & MASK_RTL_DUMP) -#define TARGET_ALL_DEBUG (target_flags & MASK_ALL_DEBUG) +#define TARGET_ALL_DEBUG (target_flags & MASK_ALL_DEBUG) #define TARGET_SWITCHES { \ { "order1", MASK_ORDER_1, NULL }, \ @@ -244,7 +244,7 @@ extern int avr_asm_only_p; /* A C expression for a string describing the name of the data type to use for size values. The typedef name `size_t' is defined using the contents of the string. - + The string can contain more than one keyword. If so, separate them with spaces, and write first any length keyword, then `unsigned' if appropriate, and finally `int'. The string must @@ -252,7 +252,7 @@ extern int avr_asm_only_p; `init_decl_processing' in the file `c-decl.c'. You may not omit `int' or change the order--that would cause the compiler to crash on startup. - + If you don't define this macro, the default is `"long unsigned int"'. */ @@ -261,7 +261,7 @@ extern int avr_asm_only_p; to use for the result of subtracting two pointers. The typedef name `ptrdiff_t' is defined using the contents of the string. See `SIZE_TYPE' above for more information. - + If you don't define this macro, the default is `"long int"'. */ @@ -365,10 +365,10 @@ extern int avr_asm_only_p; /* If defined, an initializer for a vector of integers, containing the numbers of hard registers in the order in which GNU CC should prefer to use them (from most preferred to least). - + If this macro is not defined, registers are used lowest numbered first (all else being equal). - + One use of this macro is on machines where the highest numbered registers must always be saved and the save-multiple-registers instruction supports only sequences of consetionve registers. On @@ -543,10 +543,10 @@ enum reg_class { 0x00000000}, /* POINTER_REGS, r26 - r31 */ \ {(3 << REG_X) | (3 << REG_Y) | (3 << REG_Z) | (3 << REG_W), \ 0x00000000}, /* ADDW_REGS, r24 - r31 */ \ - {0x00ff0000,0x00000000}, /* SIMPLE_LD_REGS r16 - r23 */ \ + {0x00ff0000,0x00000000}, /* SIMPLE_LD_REGS r16 - r23 */ \ {(3 << REG_X)|(3 << REG_Y)|(3 << REG_Z)|(3 << REG_W)|(0xff << 16), \ 0x00000000}, /* LD_REGS, r16 - r31 */ \ - {0x0000ffff,0x00000000}, /* NO_LD_REGS r0 - r15 */ \ + {0x0000ffff,0x00000000}, /* NO_LD_REGS r0 - r15 */ \ {0xffffffff,0x00000000}, /* GENERAL_REGS, r0 - r31 */ \ {0xffffffff,0x00000003} /* ALL_REGS */ \ } @@ -1148,7 +1148,7 @@ typedef struct avr_args { is zero for a call to an explicitly named function, a library function call, or when `INIT_CUMULATIVE_ARGS' is used to find arguments for the function being compiled. - + When processing a call to a compiler support library function, LIBNAME identifies which one. It is a `symbol_ref' rtx which contains the name of the function, as a string. LIBNAME is 0 when @@ -1164,7 +1164,7 @@ typedef struct avr_args { MODE, TYPE and NAMED describe that argument. Once this is done, the variable CUM is suitable for analyzing the *following* argument with `FUNCTION_ARG', etc. - + This macro need not do anything if the argument in question was passed on the stack. The compiler knows how to track the amount of stack space used for arguments without any special help. */ @@ -1496,7 +1496,7 @@ do { \ top level, you'll need to replace first the top leve It is not necessary for this macro to come up with a legitimate address; but often a machine-dependent strategy can generate better code. */ - + #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) \ if (GET_CODE (ADDR) == POST_INC || GET_CODE (ADDR) == PRE_DEC) \ goto LABEL @@ -1558,9 +1558,9 @@ do { \ { \ int cst = default_rtx_costs (x, code, outer_code); \ if (cst>0) \ - return cst; \ + return cst; \ else if (cst<0) \ - total += -cst; \ + total += -cst; \ break; \ } @@ -1758,7 +1758,7 @@ progmem_section () \ { \ fprintf (asm_out_file, \ "\t.section .progmem.gcc_sw_table, \"%s\", @progbits\n", \ - AVR_MEGA ? "a" : "ax"); \ + AVR_MEGA ? "a" : "ax"); \ /* Should already be aligned, this is just to be safe if it isn't. */ \ fprintf (asm_out_file, "\t.p2align 1\n"); \ in_section = in_progmem; \ @@ -1986,6 +1986,7 @@ do { \ If this macro is not defined, then the variable name is defined in the usual manner as a label (by means of `ASM_OUTPUT_LABEL'). */ +#undef ASM_FINISH_DECLARE_OBJECT #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \ do { \ const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ @@ -2050,11 +2051,11 @@ do { \ /* Globalizing directive for a label. */ #define GLOBAL_ASM_OP ".global\t" -#define ASM_WEAKEN_LABEL(FILE, NAME) \ +#define ASM_WEAKEN_LABEL(FILE, NAME) \ do \ { \ fputs ("\t.weak\t", (FILE)); \ - assemble_name ((FILE), (NAME)); \ + assemble_name ((FILE), (NAME)); \ fputc ('\n', (FILE)); \ } \ while (0) diff --git a/gcc/config/cris/aout.h b/gcc/config/cris/aout.h index dabee83a73b..1484499ff71 100644 --- a/gcc/config/cris/aout.h +++ b/gcc/config/cris/aout.h @@ -1,5 +1,5 @@ /* Definitions for GCC. Part of the machine description for CRIS. - Copyright (C) 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Axis Communications. Written by Hans-Peter Nilsson. This file is part of GCC. @@ -173,13 +173,13 @@ Boston, MA 02111-1307, USA. */ register const unsigned char *_limited_str = \ (const unsigned char *) (STR); \ register unsigned ch; \ - \ + \ fprintf ((FILE), "%s\"", STRING_ASM_OP); \ - \ + \ for (; (ch = *_limited_str); _limited_str++) \ { \ register int escape; \ - \ + \ switch (escape = ESCAPES[ch]) \ { \ case 0: \ @@ -194,7 +194,7 @@ Boston, MA 02111-1307, USA. */ break; \ } \ } \ - \ + \ fprintf ((FILE), "\"\n"); \ } \ while (0) @@ -218,16 +218,16 @@ Boston, MA 02111-1307, USA. */ for (; _ascii_bytes < limit; _ascii_bytes++) \ { \ register const unsigned char *p; \ - \ + \ if (bytes_in_chunk >= 60) \ { \ fprintf ((FILE), "\"\n"); \ bytes_in_chunk = 0; \ } \ - \ + \ for (p = _ascii_bytes; p < limit && *p != '\0'; p++) \ continue; \ - \ + \ if (p < limit && (p - _ascii_bytes) <= (long)STRING_LIMIT) \ { \ if (bytes_in_chunk > 0) \ @@ -235,7 +235,7 @@ Boston, MA 02111-1307, USA. */ fprintf ((FILE), "\"\n"); \ bytes_in_chunk = 0; \ } \ - \ + \ ASM_OUTPUT_LIMITED_STRING ((FILE), _ascii_bytes); \ _ascii_bytes = p; \ } \ @@ -243,10 +243,10 @@ Boston, MA 02111-1307, USA. */ { \ register int escape; \ register unsigned ch; \ - \ + \ if (bytes_in_chunk == 0) \ fprintf ((FILE), "%s\"", ASCII_DATA_ASM_OP); \ - \ + \ switch (escape = ESCAPES[ch = *_ascii_bytes]) \ { \ case 0: \ @@ -265,7 +265,7 @@ Boston, MA 02111-1307, USA. */ } \ } \ } \ - \ + \ if (bytes_in_chunk > 0) \ fprintf ((FILE), "\"\n"); \ } \ @@ -279,11 +279,11 @@ Boston, MA 02111-1307, USA. */ #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \ (*targetm.asm_out.globalize_label) (FILE, XSTR (FUN, 0)) -#define ASM_WEAKEN_LABEL(FILE, NAME) \ +#define ASM_WEAKEN_LABEL(FILE, NAME) \ do \ { \ fputs ("\t.weak\t", (FILE)); \ - assemble_name ((FILE), (NAME)); \ + assemble_name ((FILE), (NAME)); \ fputc ('\n', (FILE)); \ } \ while (0) @@ -316,12 +316,13 @@ Boston, MA 02111-1307, USA. */ } \ while (0) +#undef ASM_FINISH_DECLARE_OBJECT #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END)\ do \ { \ const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ HOST_WIDE_INT size; \ - \ + \ if (!flag_inhibit_size_directive \ && DECL_SIZE (DECL) \ && ! AT_END && TOP_LEVEL \ diff --git a/gcc/config/elfos.h b/gcc/config/elfos.h index 3254a0ce621..5925d256012 100644 --- a/gcc/config/elfos.h +++ b/gcc/config/elfos.h @@ -1,6 +1,6 @@ /* elfos.h -- operating system specific defines to be used when targeting GCC for some generic ELF system - Copyright (C) 1991, 1994, 1995, 1999, 2000, 2001, 2002 + Copyright (C) 1991, 1994, 1995, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Based on svr4.h contributed by Ron Guilmette (rfg@netcom.com). @@ -220,7 +220,7 @@ Boston, MA 02111-1307, USA. */ #endif #define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1) - + /* Switch into a generic section. */ #define TARGET_ASM_NAMED_SECTION default_elf_asm_named_section @@ -240,11 +240,11 @@ Boston, MA 02111-1307, USA. */ /* This is how we tell the assembler that a symbol is weak. */ -#define ASM_WEAKEN_LABEL(FILE, NAME) \ +#define ASM_WEAKEN_LABEL(FILE, NAME) \ do \ { \ fputs ("\t.weak\t", (FILE)); \ - assemble_name ((FILE), (NAME)); \ + assemble_name ((FILE), (NAME)); \ fputc ('\n', (FILE)); \ } \ while (0) @@ -313,12 +313,13 @@ Boston, MA 02111-1307, USA. */ size_directive_output was set by ASM_DECLARE_OBJECT_NAME when it was run for the same decl. */ +#undef ASM_FINISH_DECLARE_OBJECT #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END)\ do \ { \ const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ HOST_WIDE_INT size; \ - \ + \ if (!flag_inhibit_size_directive \ && DECL_SIZE (DECL) \ && ! AT_END && TOP_LEVEL \ @@ -396,13 +397,13 @@ Boston, MA 02111-1307, USA. */ register const unsigned char *_limited_str = \ (const unsigned char *) (STR); \ register unsigned ch; \ - \ + \ fprintf ((FILE), "%s\"", STRING_ASM_OP); \ - \ + \ for (; (ch = *_limited_str); _limited_str++) \ { \ register int escape; \ - \ + \ switch (escape = ESCAPES[ch]) \ { \ case 0: \ @@ -417,7 +418,7 @@ Boston, MA 02111-1307, USA. */ break; \ } \ } \ - \ + \ fprintf ((FILE), "\"\n"); \ } \ while (0) @@ -441,16 +442,16 @@ Boston, MA 02111-1307, USA. */ for (; _ascii_bytes < limit; _ascii_bytes++) \ { \ register const unsigned char *p; \ - \ + \ if (bytes_in_chunk >= 60) \ { \ fprintf ((FILE), "\"\n"); \ bytes_in_chunk = 0; \ } \ - \ + \ for (p = _ascii_bytes; p < limit && *p != '\0'; p++) \ continue; \ - \ + \ if (p < limit && (p - _ascii_bytes) <= (long)STRING_LIMIT) \ { \ if (bytes_in_chunk > 0) \ @@ -458,7 +459,7 @@ Boston, MA 02111-1307, USA. */ fprintf ((FILE), "\"\n"); \ bytes_in_chunk = 0; \ } \ - \ + \ ASM_OUTPUT_LIMITED_STRING ((FILE), _ascii_bytes); \ _ascii_bytes = p; \ } \ @@ -466,10 +467,10 @@ Boston, MA 02111-1307, USA. */ { \ register int escape; \ register unsigned ch; \ - \ + \ if (bytes_in_chunk == 0) \ fprintf ((FILE), "%s\"", ASCII_DATA_ASM_OP); \ - \ + \ switch (escape = ESCAPES[ch = *_ascii_bytes]) \ { \ case 0: \ @@ -488,7 +489,7 @@ Boston, MA 02111-1307, USA. */ } \ } \ } \ - \ + \ if (bytes_in_chunk > 0) \ fprintf ((FILE), "\"\n"); \ } \ diff --git a/gcc/config/i386/freebsd-aout.h b/gcc/config/i386/freebsd-aout.h index 646cf13b5d8..78735f0d71b 100644 --- a/gcc/config/i386/freebsd-aout.h +++ b/gcc/config/i386/freebsd-aout.h @@ -1,6 +1,6 @@ /* Definitions of target machine for GNU compiler for Intel 80386 running FreeBSD. - Copyright (C) 1988, 1992, 1994, 1996, 1997, 1999, 2000, 2002 + Copyright (C) 1988, 1992, 1994, 1996, 1997, 1999, 2000, 2002, 2003 Free Software Foundation, Inc. Contributed by Poul-Henning Kamp <phk@login.dkuug.dk> Continued development by David O'Brien <obrien@NUXI.org> @@ -175,6 +175,7 @@ Boston, MA 02111-1307, USA. */ size_directive_output was set by ASM_DECLARE_OBJECT_NAME when it was run for the same decl. */ +#undef ASM_FINISH_DECLARE_OBJECT #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \ do { \ const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ diff --git a/gcc/config/mips/iris6.h b/gcc/config/mips/iris6.h index 314f98ca43c..6e37de58f9a 100644 --- a/gcc/config/mips/iris6.h +++ b/gcc/config/mips/iris6.h @@ -418,6 +418,7 @@ while (0) size_directive_output was set by ASM_DECLARE_OBJECT_NAME when it was run for the same decl. */ +#undef ASM_FINISH_DECLARE_OBJECT #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \ do { \ const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ diff --git a/gcc/toplev.c b/gcc/toplev.c index a62492009d8..3ab85ad97f8 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -2249,14 +2249,6 @@ rest_of_decl_compilation (decl, asmspec, top_level, at_end) int top_level; int at_end; { - /* Declarations of variables, and of functions defined elsewhere. */ - -/* The most obvious approach, to put an #ifndef around where - this macro is used, doesn't work since it's inside a macro call. */ -#ifndef ASM_FINISH_DECLARE_OBJECT -#define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP, END) -#endif - /* We deferred calling assemble_alias so that we could collect other attributes such as visibility. Emit the alias now. */ { @@ -2284,11 +2276,14 @@ rest_of_decl_compilation (decl, asmspec, top_level, at_end) is seen. But at end of compilation, do output code for them. */ if (at_end || !DECL_DEFER_OUTPUT (decl)) assemble_variable (decl, top_level, at_end, 0); + +#ifdef ASM_FINISH_DECLARE_OBJECT if (decl == last_assemble_variable_decl) { ASM_FINISH_DECLARE_OBJECT (asm_out_file, decl, top_level, at_end); } +#endif timevar_pop (TV_VARCONST); } @@ -2342,7 +2337,8 @@ rest_of_decl_compilation (decl, asmspec, top_level, at_end) void rest_of_type_compilation (type, toplev) -#if defined(DBX_DEBUGGING_INFO) || defined(XCOFF_DEBUGGING_INFO) || defined (SDB_DEBUGGING_INFO) +#if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO) \ + || defined (SDB_DEBUGGING_INFO) || defined (DWARF2_DEBUGGING_INFO) tree type; int toplev; #else |