This is the mail archive of the
mailing list for the GCC project.
Re: [RFC][4.4] Conversion of tree.h STRIP_* macros into static inline functions
- From: Tom Tromey <tromey at redhat dot com>
- To: Simon Baldwin <simonb at google dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 14 Dec 2007 10:02:09 -0700
- Subject: Re: [RFC][4.4] Conversion of tree.h STRIP_* macros into static inline functions
- References: <475EE943.firstname.lastname@example.org>
- Reply-to: tromey at redhat dot com
>>>>> "Simon" == Simon Baldwin <email@example.com> writes:
Simon> The attached file, gzipped because it exceeds 100Kb, is a patch
Simon> that converts tree.h STRIP_* macros into static inline
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