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]
Other format: [Raw text]

Re: [RFC][4.4] Conversion of tree.h STRIP_* macros into static inline functions


>>>>> "Simon" == Simon Baldwin <simonb@google.com> writes:

Simon> The attached file, gzipped because it exceeds 100Kb, is a patch
Simon> that converts tree.h STRIP_* macros into static inline
Simon> functions.

I think it would be good to mark these functions with
__attribute__((warn_unused_result)).  Otherwise, I think, it would be
easy to accidentally call one erroneously -- for instance by bringing
in an old-style use when doing a merge.

Also, in this particular case, in my opinion, it would be better to
lowercase the function names.  This would have the nice effect of
breaking bad code that resulted from a merge.

If you do rename the functions then the attribute isn't as necessary
-- but I would be in favor of adding it anyway.

Finally, I noticed a new declaration of
tree_ssa_useless_type_conversion in tree.h.  Given that users of
STRIP_USELESS_TYPE_CONVERSION had to include tree-flow.h to see
the declaration, I think it would be preferable to move
STRIP_USELESS_TYPE_CONVERSION there.

Tom


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