This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: 3.0: Troubling warning in dwarf2out.c
- To: jason_merrill at redhat dot com (Jason Merrill)
- Subject: Re: 3.0: Troubling warning in dwarf2out.c
- From: Brad Lucier <lucier at math dot purdue dot edu>
- Date: Fri, 18 May 2001 18:29:32 -0500 (EST)
- Cc: lucier at math dot purdue dot edu (Brad Lucier), jsm28 at cam dot ac dot uk (Joseph S. Myers), gcc-bugs at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org, shebs at apple dot com
> Wouldn't it make sense for the definition of ASM_OUTPUT_INTERNAL_LABEL to
> simply cast "num" to the appropriate type if it wants to use fprintf?
Well, I just scanned all definitions of ASM_OUTPUT_INTERNAL_LABEL in the
gcc/config directory; all of them expect an int argument,
none of them cast the argument to int, and the macro
is passed a non-int value in only one place in all the sources,
in dwarf2out.c. (By the way, the definition of ASM_OUTPUT_INTERNAL_LABEL
in darwin.h
rs6000/darwin.h:#define ASM_OUTPUT_INTERNAL_LABEL_PREFIX(FILE,PREFIX) \
rs6000/darwin.h- fprintf (FILE, "%s", PREFIX)
seems pretty strange, since it doesn't take a third argument.)
If people decide that the macro should take any type of number and cast it
to an int, that's fine, but it will require changing a lot more code than
just casting the argument of one use of the macro to int explicitly.
Brad