This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: defaults.h silliness
- From: James E Wilson <wilson at specifixinc dot com>
- To: Mike Stump <mrs at apple dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 01 Jul 2005 19:23:17 -0700
- Subject: Re: defaults.h silliness
- References: <84A6B9AE-4267-4996-8827-4E4DD48603F3@apple.com>
Mike Stump wrote:
In defaults.h, they do:
/* This is how to output an element of a case-vector that is absolute.
Some targets don't use this, but we have to define it anyway. */
#ifndef ASM_OUTPUT_ADDR_VEC_ELT
#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
This was added before gcc-2.3.3. At the time, it was added because we
had an unconditional use of ASM_OUTPUT_ADDR_VEC_ELT. An ifdef was added
a month later, and ever since, this code has been unnecessary.
This code has always been wrong, and was never really meant to be used.
There are so many different ways or emitting case labels that I'm not
convinced that having a default definition makes sense.
Originally, there were definitions for both ASM_OUTPUT_ADDR_VEC_ELT and
ASM_OUTPUT_ADDR_DIFF_VEC_ELT. Joern deleted the
ASM_OUTPUT_ADDR_DIFF_VEC_ELT default definition in March 1996. I think
the ASM_OUTPUT_ADDR_VEC_ELT one should go too. Also, we can clean up
some backends that define it unnecessarily. The Alpha port for instance
defines it to call gcc_unreachable, which is redundant if the defaults.h
definition is deleted.
Want to submit a patch, or file a bug report?
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com