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] | |
On 02/19/2018 09:45 AM, Joseph Myers wrote:
On Sun, 18 Feb 2018, Sandra Loosemore wrote:Thanks, this makes sense. I think I could produce a documentation patch that explains that the difference is early vs late inclusion, and explains that any declarations involving tree or rtx types must go in $target-protos.h because those types are not defined when $target.h is included.That's not the case now for tree or rtx types, since they're (forward) declared in coretypes.h. It may still be the case for some types, but not those.
OK, I think I misunderstood your previous message -- it's the machine_mode-related types that have the circular dependency, but rtx and tree no longer do. Is that right?
So am I right in thinking it is actually not possible to have a .h file for internal bits shared between $target.c and the .md files, without hacking e.g. genrecog.c which currently emits a fixed set of include directives?I'm not aware of a way to do that.
Thinking about it some more, perhaps in $target-protos.h #ifdef IN_TARGET_CODE #include "$target-internal.h" #endif ?? -Sandra
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |