This is the mail archive of the gcc-patches@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]

Re: PATCH: 64-bit uncleanliness fix


> 
> On Sat, Mar 17, 2001 at 02:01:38PM -0500, Brad Lucier wrote:
> > Before sending this, I grepped all 'define ASM_OUTPUT_INTERNAL_LABEL'
> > in config/*; none of them perform a cast.  And the argument is
> > really a long unsigned int on all architectures.  So I don't see how
> > your suggestion is correct.
> 
> Only ASM_OUTPUT_INTERNAL_LABEL knows that printf format
> specifier it used.

At the end of this message I include the output of

grep -C -r 'define ASM_OUTPUT_INTERNAL_LABEL(' * 

in config.  As far as I can tell, all architectures use a %d format
specifier for the third argument; and on all architectures, the argument at
line 1721 of dwarf2out.c is a unsigned long int.

So, are you saying that we should change the format specifier in 
ASM_OUTPUT_INTERNAL_LABEL on all architectures instead of making this
one cast to int in dwarf2out.c?

Perhaps I just need a bit more explanation here of your reasoning.  I
don't seem to be getting it.

Brad

1750a/1750a.h-   PREFIX is the class of label and NUM is the number within the class.  */
1750a/1750a.h-
1750a/1750a.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)		\
1750a/1750a.h-	do {							\
1750a/1750a.h-	  if (strcmp(PREFIX,"LC") == 0) {			\
--
a29k/a29k.h-   PREFIX is the class of label and NUM is the number within the class.  */
a29k/a29k.h-
a29k/a29k.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\
a29k/a29k.h-  fprintf (FILE, "%s%d:\n", PREFIX, NUM)
a29k/a29k.h-
--
alpha/alpha.h-   PREFIX is the class of label and NUM is the number within the class.  */
alpha/alpha.h-
alpha/alpha.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\
alpha/alpha.h-  fprintf (FILE, "$%s%d:\n", PREFIX, NUM)
alpha/alpha.h-
--
arc/arc.h-   PREFIX is the class of label and NUM is the number within the class.  */
arc/arc.h-#undef ASM_OUTPUT_INTERNAL_LABEL
arc/arc.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE, PREFIX, NUM) \
arc/arc.h-do {						\
arc/arc.h-  arc_ccfsm_at_label (PREFIX, NUM);		\
--
arm/arm.h-/* Output an internal label definition.  */
arm/arm.h-#ifndef ASM_OUTPUT_INTERNAL_LABEL
arm/arm.h:#define ASM_OUTPUT_INTERNAL_LABEL(STREAM, PREFIX, NUM)		\
arm/arm.h-  do								\
arm/arm.h-    {								\
--
arm/elf.h-/* Output an internal label definition.  */
arm/elf.h-#ifndef ASM_OUTPUT_INTERNAL_LABEL
arm/elf.h:#define ASM_OUTPUT_INTERNAL_LABEL(STREAM, PREFIX, NUM)  	\
arm/elf.h-  do								\
arm/elf.h-    {								\
--
avr/avr.h-   be emitted as one-only.  */
avr/avr.h-
avr/avr.h:#define ASM_OUTPUT_INTERNAL_LABEL(STREAM, PREFIX, NUM)	\
avr/avr.h-fprintf(STREAM, ".%s%d:\n", PREFIX, NUM)
avr/avr.h-/* A C statement to output to the stdio stream STREAM a label whose
--
c4x/c4x.h-   PREFIX is the class of label and NUM is the number within the class.  */
c4x/c4x.h-
c4x/c4x.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE, PREFIX, NUM)	\
c4x/c4x.h-asm_fprintf (FILE, "%s%d:\n", PREFIX, NUM)
c4x/c4x.h-
--
convex/convex.h-   PREFIX is the class of label and NUM is the number within the class.  */
convex/convex.h-
convex/convex.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\
convex/convex.h-  fprintf (FILE, "%s%d:\n", PREFIX, NUM)
convex/convex.h-
--
d30v/d30v.h-
d30v/d30v.h-   Defined in svr4.h.  */
d30v/d30v.h:/* #define ASM_OUTPUT_INTERNAL_LABEL(STREAM, PREFIX, NUM) */
d30v/d30v.h-
d30v/d30v.h-/* A C statement to store into the string STRING a label whose name is made
--
dsp16xx/dsp16xx.h-/* This is how to output an internal numbered label where
dsp16xx/dsp16xx.h-   PREFIX is the class of label and NUM is the number within the class.  */
dsp16xx/dsp16xx.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\
dsp16xx/dsp16xx.h-  fprintf (FILE, "%s%d:\n", PREFIX, NUM)
dsp16xx/dsp16xx.h-
--
elfos.h-
elfos.h-#undef  ASM_OUTPUT_INTERNAL_LABEL
elfos.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE, PREFIX, NUM)	\
elfos.h-  do							\
elfos.h-    {							\
--
elxsi/elxsi.h-   PREFIX is the class of label and NUM is the number within the class.  */
elxsi/elxsi.h-
elxsi/elxsi.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\
elxsi/elxsi.h-  fprintf (FILE, ".%s%d:\n", PREFIX, NUM)
elxsi/elxsi.h-
--
h8300/h8300.h-   how to generate internal labels.  */
h8300/h8300.h-
h8300/h8300.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE, PREFIX, NUM)	\
h8300/h8300.h-  fprintf (FILE, ".%s%d:\n", PREFIX, NUM)
h8300/h8300.h-
--
i370/i370.h-   must reload the base register.  */
i370/i370.h-
i370/i370.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE, PREFIX, NUM) 			\
i370/i370.h-{									\
i370/i370.h-  if (!strcmp (PREFIX,"L"))						\
--
i370/i370.h-   for loops, goto's and case labels.   */
i370/i370.h-#undef ASM_OUTPUT_INTERNAL_LABEL
i370/i370.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE, PREFIX, NUM) 			\
i370/i370.h-{									\
i370/i370.h-  if (!strcmp (PREFIX,"L"))						\
--
i386/att.h-
i386/att.h-#undef ASM_OUTPUT_INTERNAL_LABEL
i386/att.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\
i386/att.h-  fprintf (FILE, "%s%s%d:\n", LOCAL_LABEL_PREFIX, PREFIX, NUM)
i386/att.h-
--
i386/bsd.h-
i386/bsd.h-#ifdef NO_UNDERSCORES
i386/bsd.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\
i386/bsd.h-  fprintf (FILE, ".%s%d:\n", PREFIX, NUM)
i386/bsd.h-#else
i386/bsd.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\
i386/bsd.h-  fprintf (FILE, "%s%d:\n", PREFIX, NUM)
i386/bsd.h-#endif
--
i386/gas.h-
i386/gas.h-#undef ASM_OUTPUT_INTERNAL_LABEL
i386/gas.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\
i386/gas.h-  fprintf (FILE, ".%s%d:\n", PREFIX, NUM)
i386/gas.h-
--
i386/next.h-
i386/next.h-#undef ASM_OUTPUT_INTERNAL_LABEL
i386/next.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\
i386/next.h-  fprintf (FILE, "%s%d:\n", PREFIX, NUM)
i386/next.h-
--
i386/osfrose.h-
i386/osfrose.h-#undef	ASM_OUTPUT_INTERNAL_LABEL
i386/osfrose.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)			\
i386/osfrose.h-  fprintf (FILE, "%s%s%d:\n", (TARGET_UNDERSCORES) ? "" : ".",		\
i386/osfrose.h-	   PREFIX, NUM)
--
i386/sco5.h-
i386/sco5.h-#undef ASM_OUTPUT_INTERNAL_LABEL
i386/sco5.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)			\
i386/sco5.h-  fprintf (FILE, ".%s%d:\n", PREFIX, NUM)
i386/sco5.h-
--
i386/sequent.h-
i386/sequent.h-#undef ASM_OUTPUT_INTERNAL_LABEL
i386/sequent.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)\
i386/sequent.h-  fprintf (FILE, ".%s%d:\n", PREFIX, NUM)
i386/sequent.h-
--
i386/sun386.h-   PREFIX is the class of label and NUM is the number within the class.  */
i386/sun386.h-
i386/sun386.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\
i386/sun386.h-  fprintf (FILE, ".%s%d:\n", PREFIX, NUM)
--
i860/i860.h-   PREFIX is the class of label and NUM is the number within the class.  */
i860/i860.h-
i860/i860.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\
i860/i860.h-  fprintf (FILE, ".%s%d:\n", PREFIX, NUM)
i860/i860.h-
--
i960/i960.h-   PREFIX is the class of label and NUM is the number within the class.  */
i960/i960.h-
i960/i960.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\
i960/i960.h-  fprintf (FILE, "%s%d:\n", PREFIX, NUM)
i960/i960.h-
--
m68k/3b1.h-  sprintf ((LABEL), "%s%%%d", (PREFIX), (NUM))
m68k/3b1.h-
m68k/3b1.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\
m68k/3b1.h-    fprintf (FILE, "%s%%%d:\n", PREFIX, NUM)
m68k/3b1.h-
--
m68k/amix.h-
m68k/amix.h-#undef ASM_OUTPUT_INTERNAL_LABEL
m68k/amix.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\
m68k/amix.h-  if (flag_pic && !strcmp(PREFIX,"LC"))			\
m68k/amix.h-    asm_fprintf (FILE, "%s%%%d:\n", PREFIX, NUM);	\
--
m68k/atari.h-
m68k/atari.h-#undef ASM_OUTPUT_INTERNAL_LABEL
m68k/atari.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\
m68k/atari.h-  if (flag_pic && !strcmp(PREFIX,"LC"))			\
m68k/atari.h-    asm_fprintf (FILE, "%s%%%d:\n", PREFIX, NUM);	\
--
m68k/m68k.h-   PREFIX is the class of label and NUM is the number within the class.  */
m68k/m68k.h-
m68k/m68k.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\
m68k/m68k.h-  asm_fprintf (FILE, "%0L%s%d:\n", PREFIX, NUM)
m68k/m68k.h-
--
m68k/hp320.h-  sprintf ((OUTPUT), "%s___%d", (NAME), (LABELNO)))
m68k/hp320.h-
m68k/hp320.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\
m68k/hp320.h-do{  if (PREFIX[0] == 'L' && PREFIX[1] == 'I')		\
m68k/hp320.h-    fprintf(FILE, "\tset %s%d,.+2\n", PREFIX, NUM);	\
--
m68k/mot3300.h-
m68k/mot3300.h-#undef ASM_OUTPUT_INTERNAL_LABEL
m68k/mot3300.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\
m68k/mot3300.h-    asm_fprintf (FILE, "%L%s%d:\n", PREFIX, NUM)
m68k/mot3300.h-
--
m68k/tower-as.h-
m68k/tower-as.h-#undef ASM_OUTPUT_INTERNAL_LABEL
m68k/tower-as.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\
m68k/tower-as.h-  fprintf ((FILE), "%s%%%d:\n", (PREFIX), (NUM))
m68k/tower-as.h-
--
m88k/m88k.h-#undef ASM_OUTPUT_INTERNAL_LABEL
m88k/m88k.h-#ifdef AS_BUG_DOT_LABELS /* The assembler requires a declaration of local.  */
m88k/m88k.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)			\
m88k/m88k.h-  fprintf (FILE, TARGET_SVR4 ? ".%s%d:\n%s.%s%d\n" : "@%s%d:\n", \
m88k/m88k.h-	   PREFIX, NUM, INTERNAL_ASM_OP, PREFIX, NUM)
m88k/m88k.h-#else
m88k/m88k.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)			\
m88k/m88k.h-  fprintf (FILE, TARGET_SVR4 ? ".%s%d:\n" : "@%s%d:\n", PREFIX, NUM)
m88k/m88k.h-#endif /* AS_BUG_DOT_LABELS */
--
mcore/mcore.h-/* Output an internal label definition.  */
mcore/mcore.h-#undef  ASM_OUTPUT_INTERNAL_LABEL
mcore/mcore.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\
mcore/mcore.h-  fprintf (FILE, ".%s%d:\n", PREFIX, NUM)
mcore/mcore.h-
--
mips/mips.h-   PREFIX is the class of label and NUM is the number within the class.  */
mips/mips.h-
mips/mips.h:#define ASM_OUTPUT_INTERNAL_LABEL(STREAM,PREFIX,NUM)			\
mips/mips.h-  fprintf (STREAM, "%s%s%d:\n", LOCAL_LABEL_PREFIX, PREFIX, NUM)
mips/mips.h-
--
ns32k/encore.h-#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM)			\
ns32k/encore.h-	sprintf (LABEL, "*.%s%d", PREFIX, NUM)
ns32k/encore.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)			\
ns32k/encore.h-	fprintf (FILE, ".%s%d:\n", PREFIX, NUM)
ns32k/encore.h-#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL)		\
--
ns32k/ns32k.h-   PREFIX is the class of label and NUM is the number within the class.  */
ns32k/ns32k.h-
ns32k/ns32k.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\
ns32k/ns32k.h-  fprintf (FILE, "%s%d:\n", PREFIX, NUM)
ns32k/ns32k.h-
--
pa/pa.h-   PREFIX is the class of label and NUM is the number within the class.  */
pa/pa.h-
pa/pa.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\
pa/pa.h-  {fprintf (FILE, "%c$%s%04d\n", (PREFIX)[0], (PREFIX) + 1, NUM);}
pa/pa.h-
--
pdp11/pdp11.h-   PREFIX is the class of label and NUM is the number within the class.  */
pdp11/pdp11.h-
pdp11/pdp11.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\
pdp11/pdp11.h-  fprintf (FILE, "%s_%d:\n", PREFIX, NUM)
pdp11/pdp11.h-
--
pj/pj.h-
pj/pj.h-/* Output an internal label definition.  */
pj/pj.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
pj/pj.h-  asm_fprintf ((FILE), "%L%s%d:\n", (PREFIX), (NUM))
pj/pj.h-
--
romp/romp.h-   PREFIX is the class of label and NUM is the number within the class.  */
romp/romp.h-
romp/romp.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\
romp/romp.h-  fprintf (FILE, "%s%d:\n", PREFIX, NUM)
romp/romp.h-
--
rs6000/aix.h-   PREFIX is the class of label and NUM is the number within the class.  */
rs6000/aix.h-
rs6000/aix.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\
rs6000/aix.h-  fprintf (FILE, "%s..%d:\n", PREFIX, NUM)
rs6000/aix.h-
--
sh/elf.h-
sh/elf.h-#undef ASM_OUTPUT_INTERNAL_LABEL
sh/elf.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
sh/elf.h-  asm_fprintf ((FILE), "%L%s%d:\n", (PREFIX), (NUM))
sh/elf.h-
--
sh/sh.h-
sh/sh.h-/* Output an internal label definition.  */
sh/sh.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
sh/sh.h-  asm_fprintf ((FILE), "%L%s%d:\n", (PREFIX), (NUM))
sh/sh.h-
--
sparc/linux.h-
sparc/linux.h-#undef  ASM_OUTPUT_INTERNAL_LABEL
sparc/linux.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\
sparc/linux.h-  fprintf (FILE, ".L%s%d:\n", PREFIX, NUM)
sparc/linux.h-
--
sparc/linux64.h-
sparc/linux64.h-#undef  ASM_OUTPUT_INTERNAL_LABEL
sparc/linux64.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\
sparc/linux64.h-  fprintf (FILE, ".L%s%d:\n", PREFIX, NUM)
sparc/linux64.h-
--
sparc/pbd.h-
sparc/pbd.h-#undef  ASM_OUTPUT_INTERNAL_LABEL
sparc/pbd.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)                      \
sparc/pbd.h-        fprintf (FILE, ".%s%d:\n", PREFIX, NUM)
sparc/pbd.h-
--
sparc/sol2.h-
sparc/sol2.h-#undef  ASM_OUTPUT_INTERNAL_LABEL
sparc/sol2.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\
sparc/sol2.h-  fprintf (FILE, ".L%s%d:\n", PREFIX, NUM)
sparc/sol2.h-
--
sparc/sparc.h-   PREFIX is the class of label and NUM is the number within the class.  */
sparc/sparc.h-
sparc/sparc.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\
sparc/sparc.h-  fprintf (FILE, "%s%d:\n", PREFIX, NUM)
sparc/sparc.h-
--
sparc/vxsim.h-
sparc/vxsim.h-#undef  ASM_OUTPUT_INTERNAL_LABEL
sparc/vxsim.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\
sparc/vxsim.h-  fprintf (FILE, ".L%s%d:\n", PREFIX, NUM)
sparc/vxsim.h-
--
svr3.h-
svr3.h-#undef ASM_OUTPUT_INTERNAL_LABEL
svr3.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\
svr3.h-  asm_fprintf (FILE, "%0L%s%d:\n", PREFIX, NUM)
svr3.h-
--
vax/vax.h-   PREFIX is the class of label and NUM is the number within the class.  */
vax/vax.h-
vax/vax.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\
vax/vax.h-  fprintf (FILE, "%s%d:\n", PREFIX, NUM)
vax/vax.h-
--
we32k/we32k.h-   PREFIX is the class of label and NUM is the number within the class.  */
we32k/we32k.h-
we32k/we32k.h:#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\
we32k/we32k.h-  fprintf (FILE, ".%s%d:\n", PREFIX, NUM)
we32k/we32k.h-


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