[cfe-commits] r59622 - /cfe/trunk/lib/CodeGen/CGExprScalar.cpp
Daniel Dunbar
daniel at zuster.org
Wed Nov 19 03:54:07 PST 2008
Author: ddunbar
Date: Wed Nov 19 05:54:05 2008
New Revision: 59622
URL: http://llvm.org/viewvc/llvm-project?rev=59622&view=rev
Log:
Add spec ref to comment.
Modified:
cfe/trunk/lib/CodeGen/CGExprScalar.cpp
Modified: cfe/trunk/lib/CodeGen/CGExprScalar.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprScalar.cpp?rev=59622&r1=59621&r2=59622&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprScalar.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprScalar.cpp Wed Nov 19 05:54:05 2008
@@ -787,7 +787,9 @@
Result = EmitScalarConversion(Result, ResultTy, LHSTy);
// Store the result value into the LHS lvalue. Bit-fields are
- // handled specially because the result is altered by the store.
+ // handled specially because the result is altered by the store,
+ // i.e., [C99 6.5.16p1] 'An assignment expression has the value of
+ // the left operand after the assignment...'.
if (LHSLV.isBitfield())
CGF.EmitStoreThroughBitfieldLValue(RValue::get(Result), LHSLV, LHSTy,
&Result);
@@ -1003,7 +1005,9 @@
Value *RHS = Visit(E->getRHS());
// Store the value into the LHS. Bit-fields are handled specially
- // because the result is altered by the store.
+ // because the result is altered by the store, i.e., [C99 6.5.16p1]
+ // 'An assignment expression has the value of the left operand after
+ // the assignment...'.
// FIXME: Volatility!
if (LHS.isBitfield())
CGF.EmitStoreThroughBitfieldLValue(RValue::get(RHS), LHS, E->getType(),
More information about the cfe-commits
mailing list