defaults.h silliness

Mike Stump mrs@apple.com
Fri Jun 24 00:12:00 GMT 2005


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)  \
do { fputs (integer_asm_op (POINTER_SIZE / BITS_PER_UNIT, TRUE),  
FILE); \
      (*targetm.asm_out.internal_label) (FILE, "L",  
(VALUE));                    \
      fputc ('\n',  
FILE);                                                \
    } while (0)
#endif

but internal_label is used to output a definition of a label, and  
ASM_OUTPUT_ADDR_VEC_ELT is supposed to output a mere use of the label.

s390.h has a more suitable default definition:
/* Output an element of a case-vector that is absolute.  */
#define ASM_OUTPUT_ADDR_VEC_ELT(FILE,  
VALUE)                            \
do  
{                                                                    \
   char buf 
[32];                                                         \
   fputs (integer_asm_op (UNITS_PER_WORD, TRUE),  
(FILE));                \
   ASM_GENERATE_INTERNAL_LABEL (buf, "L",  
(VALUE));                      \
   assemble_name ((FILE),  
buf);                                          \
   fputc ('\n',  
(FILE));                                                 \
} while (0)

:-(  Having defaults that no one can use, is silly?!



More information about the Gcc mailing list