On Tue, Jun 16, 2015 at 7:17 PM, Andrew MacLeod <amacl...@redhat.com> wrote: > > There are 2 macros defined in tree.h the depend on the definition of > NO_DOT_IN_LABEL and NO_DOLLAR_IN_LABEL. These are ANON_AGGRNAME_FORMAT and > ANON_AGGRNAME_P. This means that in order to get the correct values for > those macros, you have to be sure that tm.h was included before tree.h, and > thats the only conditional dependency tree.h has on tm.h. > > By changing those 2 macos to functions and defining them in tree.c, the > restriction/requirement is removed. These are not heavily used, Im sure > compilation issues are unmeasurable.
Well, I'm sure it's not measurable, but 100 changes like this and it will become a measurable slowdown... I wonder if the macros should simply move to target.h > There is also single hard compilation dependency on the definition of > TARGET_DLLIMPORT_DECL_ATTRIBUTES. it shows: > > #if TARGET_DLLIMPORT_DECL_ATTRIBUTES > /* Given two Windows decl attributes lists, possibly including > dllimport, return a list of their union . */ > extern tree merge_dllimport_decl_attributes (tree, tree); > > /* Handle a "dllimport" or "dllexport" attribute. */ > extern tree handle_dll_attribute (tree *, tree, tree, int, bool *); > #endif > > > defaults.h provides a default definition of 0, but I'm not convinced that we > need to hide function prototypes like this... Anything that cares will be > checking that macro before calling or creating those functions... and if > they don't there will be an unresolved external at compilation time.. so we > still get an error. We also don't get any errors if the prototype isn't > used. If it is not protected, then it removes the need to have defaults.h > and tm.h included before tree.h > > This patch makes both these changes, and tree.h no longer requires tm.h or > defaults.h > > bootstraps on x86_64-unknown-linux-gnu with no new regressions. No failures > on config-list.mk target runs either. > > OK for trunk? Ok. Thanks, Richard. > Andrew > >