This is the mail archive of the gcc@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] |
Other format: | [Raw text] |
I am wondering where to define the prototypes for functions in <machine>.c Shall the prototypes be defined in <machine>-protos.h or in <machine>.h or in <machine>.c. As far as I understand the prototypes should be defined in <machine>-protos.h, right? But if I do so several errors/warnings arise because of undeclared prototypes.
Another question is where target macros should be defined. As far as I can see <machine>.c has something like such a structure:
---snip--- #define <SOME_MACRO> #define <SOME_MACRO> #define <SOME_MACRO> #define <SOME_MACRO>
struct gcc_target targetm = TARGET_INITIALIZER;
<machine>.h is used to define macros that give such information as the register classes, whether little endian or not, sizes of integral types etc. The file <machine>.c, like you rightly said defines the targetm structure that holds pointers to target related functions and data. Such functions are defined in the .c file. Such target hooks are #defined in the .c file. HTH, Pranav
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |