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: Trivial toplev.c patch


    > So is the idea to replace *all* macros with the target structure?

    Yup, just like it says at the top of target.h.

That seems very wrong to me.  Has this been discussed widely?

Macros seem like the perfect level of abstraction for this and have worked
well for nearly two decades.  Why change them?

I thought the idea of the target structure was to handle some new obscure
hooks, not to replace everything!

It's far cleaner to define macros (which are in one place) instead of having
this huge structure initializer (which can't be done in a named fashion,
unlike macros) and then to generate functions for things that are best
expressed in macros.  It means things have to be in *two* places instead of
one.  Plus, there are efficiency issues (which I admit are relatively minor).

The model has always been that the .h and .md files are primary, with the
.c file containing "overflow".  You seem to be wanting to reverse that.

How will defaulting work if everything has to be in the structure?  How do
you override (or undefine) macros in system-specific .h files? 

Can you explain the arguments in favor of such a radical change to the way
GCC works?


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