This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: defaults.h silliness


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]