comparison dmd/expression.c @ 1168:ab186e535e72

A different fix to #218 and DMD2682 that does not lead to constant folding regressions. Fixes run/const_15, run/c/const_16_B. The price is removing the lvalueness of struct literals. If it turns out too much code depends on this behavior or we don't want to break with DMD, we could keep struct literals as lvalues and instead convert struct literals used as expression initializers into struct initializers.
author Christian Kamm <kamm incasoftware de>
date Sun, 29 Mar 2009 11:43:45 +0200
parents 3cf0066e6faf
children e961851fb8be
comparison
equal deleted inserted replaced
1164:166042b48c28 1168:ab186e535e72
3232 { 3232 {
3233 return 1; 3233 return 1;
3234 } 3234 }
3235 #endif 3235 #endif
3236 3236
3237 /*
3238 Removed in LDC. See declaration.
3237 Expression *StructLiteralExp::toLvalue(Scope *sc, Expression *e) 3239 Expression *StructLiteralExp::toLvalue(Scope *sc, Expression *e)
3238 { 3240 {
3239 return this; 3241 return this;
3240 } 3242 }
3243 */
3241 3244
3242 3245
3243 int StructLiteralExp::checkSideEffect(int flag) 3246 int StructLiteralExp::checkSideEffect(int flag)
3244 { int f = 0; 3247 { int f = 0;
3245 3248