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: Refine verify_expr and LHS


On Fri, 2004-06-25 at 11:36, Richard Kenner wrote:
> > +   /* Check operand N for being valid GIMPLE and give error MSG if not.  */
> > + #define CHECK_OP(N, MSG) \
> > +   do { if (TREE_CODE_CLASS (TREE_CODE (TREE_OPERAND (t, N))) != 'c'	\
> > +          && !is_gimple_val (TREE_OPERAND (t, N)))			\
> > +        { error (MSG); return TREE_OPERAND (t, N); }} while (0)
> 
>     Can you just make this a function? It seems generically useful.
> 
> Well, the first two lines maybe, but the last line seems awfully specialized
> to me.  Where else would it be used?

I was merely reading the comment on the code. I can see that it might be
less useful. Perhaps just check for valid gimple, return an error
message if not, and then do whatever processing you need outside of the
function? And update the comment with what you're really doing?

-eric

-- 
Eric Christopher <echristo@redhat.com>


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