This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Converting tm.h macros to functions
- To: <gcc at gcc dot gnu dot org>
- Subject: Converting tm.h macros to functions
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Date: Sun, 17 Jun 2001 18:10:06 +0100 (BST)
One thing that has been mentioned from time to time is that a lot of tm.h
macros (such as ASM_OUTPUT_*) should really be proper functions with
documented prototypes. Some questions about the details of how this
should be done:
* Where should the default versions of these functions go? In random
source files, or in a new defaults.c?
* How should a target indicate that it has its own version of one of these
functions? Should a macro be used (e.g., defining HAVE_asm_output_ascii
to indicate that the target has its own asm_output_ascii function and the
default one should not be compiled in) or should function pointers be
used, initialised to the default function and changed (where?) by the back
end to point to the back-end-specific version?
--
Joseph S. Myers
jsm28@cam.ac.uk