On Thu, Sep 18, 2014 at 10:11:24AM -0600, Aldy Hernandez wrote: > Similarly named DECL_ABSTRACT, DECL_ABSTRACT_ORIGIN, and DECL_ORIGIN are > somewhat confusing to my poor brain. Particularly annoying is DECL_ABSTRACT > which is actually a boolean, unlike the other two. > > Would it be OK to rename it something more sensible like DECL_ABSTRACT_P? I > know this is a longstanding name, but the proposed is clearer and virtually > the same. > > OK for mainline?
IMHO a good idea. > --- a/gcc/cp/class.c > +++ b/gcc/cp/class.c > @@ -4580,7 +4580,7 @@ clone_function_decl (tree fn, int update_method_vec_p) > } > > /* Note that this is an abstract function that is never emitted. */ > - DECL_ABSTRACT (fn) = 1; > + DECL_ABSTRACT_P (fn) = 1; It'd probably make sense to use 'true' now. > @@ -10272,7 +10272,7 @@ grokdeclarator (const cp_declarator *declarator, > clones. The decloning optimization (for space) may > revert this subsequently if it determines that > the clones should share a common implementation. */ > - DECL_ABSTRACT (decl) = 1; > + DECL_ABSTRACT_P (decl) = 1; Likewise. > --- a/gcc/tree-inline.c > +++ b/gcc/tree-inline.c > @@ -5095,7 +5095,7 @@ copy_decl_no_change (tree decl, copy_body_data *id) > copy = copy_node (decl); > > /* The COPY is not abstract; it will be generated in DST_FN. */ > - DECL_ABSTRACT (copy) = 0; > + DECL_ABSTRACT_P (copy) = 0; > lang_hooks.dup_lang_specific_decl (copy); And false here. > --- a/gcc/varpool.c > +++ b/gcc/varpool.c > @@ -704,7 +704,7 @@ add_new_static_var (tree type) > TREE_STATIC (new_decl) = 1; > TREE_USED (new_decl) = 1; > DECL_CONTEXT (new_decl) = NULL_TREE; > - DECL_ABSTRACT (new_decl) = 0; > + DECL_ABSTRACT_P (new_decl) = 0; And here. Marek