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: 3.0: Troubling warning in dwarf2out.c


> 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


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