[PATCH PING 2/5] Named address spaces: support multiple pointer modes

Ulrich Weigand uweigand@de.ibm.com
Wed Sep 23 01:17:00 GMT 2009


Richard Henderson wrote:
> On 09/22/2009 03:50 PM, Ulrich Weigand wrote:
> > It seemed to me that of the two, target-def.h was a more natural
> > place for the new macro.  If you have a better suggestion where
> > to place it, I'll be happy to do so ...
> 
> The macro you're defining would seem to belong
> possibly in target.h.  Though normally there's
> some sort of good place in tree.h or rtl.h that
> gets used instead.

Well, the problem with this is that the macro refers to
function names declared in targhooks.h, which is not
included by any of the standard headers.  So I thought
it would be best to place the macro into either targhooks.h
or target-def.h (which is the only header that itself
includes targhooks.h).  The latter seemed more appropriate
as the former doesn't define any macros today, however ...

Joseph Myers wrote:
> target-def.h should only be included in the target-specific .c files that 
> define the target structure using an initializer whose default values come 
> from target-def.h; no file not defining such an initializer should include 
> it. 

... it seems my reasoning was wrong here.

So I guess the macro can either go into targhooks.h after all,
or maybe it should go into target.h with the additional rule
that you need to also include targhooks.h if you want to use it.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com



More information about the Gcc-patches mailing list