On Fri, Oct 20, 2017 at 5:53 PM, David Malcolm <dmalc...@redhat.com> wrote: > Design questions: > > * The patch introduces a new kind of tree node, currently called > DECL_WRAPPER_EXPR (although it's used for wrapping constants as well > as decls). Should wrappers be a new kind of tree node, or should they > reuse an existing TREE_CODE? (e.g. NOP_EXPR, CONVERT_EXPR, etc). > * NOP_EXPR: seems to be for use as an rvalue > * CONVERT_EXPR: for type conversions > * NON_LVALUE_EXPR: "Value is same as argument, but guaranteed not an > lvalue" > * but we *do* want to support lvalues here
I think using NON_LVALUE_EXPR for constants would be appropriate. > * VIEW_CONVERT_EXPR: viewing one thing as of a different type > * can it support lvalues? Yes, the purpose of VIEW_CONVERT_EXPR is to support lvalues, it seems like the right choice. Jason