This is the mail archive of the 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

On 12/19/07, Kaveh R. GHAZI <> wrote:
> On Tue, 18 Dec 2007, Simon Baldwin wrote:
> > Attached is a revised version of this patch, incorporating review
> > comments; thanks for the feedback.
> >
> > + static inline tree __attribute__((warn_unused_result))
> > + STRIP_NOPS (const_tree exp)
> You can't use a naked __attribute__ keyword like that because that will
> break bootrapping with non-gcc compilers.  It will also break
> bootstrapping with gcc versions released prior to adding the
> __warn_unused_result__ feature.

Really I think any use of warn_unused_result is wrong and should not
be included.  You are forcing a warning that can be avoided if the
person knows what he/she doing.

Really you should not be changing the behavior of
STRIP_NOPS/STRIP_SIGN_NOPS, etc. There is a simple way around to
changing their behavior, still have a macro but pass address to the
new inline function and act on that.  Or even have them take an
address to a tree.  And then you can also get rid of the crappy

Also I noticed you have some coding style violations:
+   return CONST_CAST_TREE(exp);
there is missing a space there.

And this just looks like some child started to draw all over the wall
(that reminds me, I need to deal with a couple of children soon):
!   cond = STRIP_NOPS (fold_build2 (LT_EXPR, boolean_type_node, t1, t2));

Andrew Pinski

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