| |||
| Home > ARM Compiler Reference > GNU extensions to the ARM compiler > Lvalues | |||
GNU mode enables a more relaxed definition on what constitutes
an lvalue when looking at comma expressions and ?: constructs.
You can use compound expressions, conditional expressions, and casts
as follows:
You can assign a compound expression:
(a, b) += x;
This is equivalent to:
temp = (a,b); b = temp + x
This causes the ARM compiler to generate a warning, for example:
Warning: #174-D: expression has no effect
You can get the address of a compound expression &(a,
b). This is equivalent to (a, &b).
You can use conditional expressions, for example:
(a ? b : c) = a;
This picks b or c as
the destination dependent on a.
Supported in GNU mode only.