This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: $target.h vs $target-protos.h
On Mon, 19 Feb 2018, Sandra Loosemore wrote:
> 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?
The machine_mode-related types don't either (since coretypes.h includes
insn-modes.h and machmode.h). Some types may well still have that
dependency, but I don't know which.
--
Joseph S. Myers
joseph@codesourcery.com