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: [C++ PATCH]: Fix 11295 - Make statement exprs work properly inC++


On Wed, 2003-07-30 at 10:44, Nathan Sidwell wrote:
> Hi,
> This patch makes statement expressions function properly with C++.
> Statement expressions did not behave correctly for non-pod types. This
> patch makes them work in a similar manner to a function returning
> a struct by value - a TARGET_EXPR is build whose initializer is the
> statement-expression.
> 
> The awkardness with tf_stmt_expr and tf_stmt_exprs occurs because
> a STMT_EXPR simply contains a COMPOUND_STMT, rather than a list
> of statements and a separate 'result statement'. The STMT_EXPR
> machinery can know it is supposed to wrap things in a scope etc.

This patch is OK.

However:

 
+   tf_stmt_expr = 1 << 6,      /* tsubsting the statement of a
statement
+                                expr.  */
+   tf_stmt_exprs = 1 << 7      /* tsubsting the statements of a
statement
+                                expr.  */

"the statement" vs "the statements" isn't terribly clear to me and the
names are "expr" vs "exprs" which seems like the number of expressions
is what's changing.  Are there names we could use that would be more
obviously distinct?

Thanks,

-- 
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com


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