------- Additional Comments From joseph at codesourcery dot com 2005-04-04 13:41 ------- Subject: Re: [Committed] PR c++/19199: Preserve COND_EXPR lvalueness in fold
On Mon, 4 Apr 2005, Alexandre Oliva wrote: > Err... Why did you choose to drop the portion of the patch below, > that would have avoided the ugliness of comparing langhooks.name, but > still retained it in the ChangeLog entry? pedantic_lvalues means "this is C, until I manage to disentangle enough C/C++/ObjC interactions to keep lvalueness internal to the C front end so pedantic_lvalues can go away". Checking langhooks.name tests for C++, i.e. they differ in their effects for all languages other than C/ObjC/C++: only C/ObjC require that conditional expressions not be turned into lvalues if they weren't such to start with, while only C++ requires that conditional expressions which were lvalues be preserved in their original form. The proper hook to check is one meaning "this is C++" rather than "this is not C", though perhaps adding a new hook "fold_preserve_cond_expr_p" would be cleaner than checking langhooks.name. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19199