This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Refine verify_expr and LHS
- From: Eric Christopher <echristo at redhat dot com>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 25 Jun 2004 11:46:29 -0700
- Subject: Re: Refine verify_expr and LHS
- References: <10406251836.AA12241@vlsi1.ultra.nyu.edu>
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>