@@ -124,7 +124,7 @@ $(H3 $(LNAME2 assignment_operator_expressions, Assignment Operator Expressions))
124
124
$(UL
125
125
$(LI operand $(D a) is only evaluated once,)
126
126
$(LI overloading $(I op) uses a different function than overloading $(I op)= does, and)
127
- $(LI the left operand of $(D >>>=) does not undergo integral promotions before shifting.)
127
+ $(LI the left operand of $(D >>>=) does not undergo $(INTEGER_PROMOTIONS) before shifting.)
128
128
)
129
129
130
130
$(P For user-defined types, assignment operator expressions are overloaded separately from
@@ -216,7 +216,7 @@ $(H2 $(LNAME2 bitwise_expressions, Bitwise Expressions))
216
216
217
217
$(P Bit wise expressions perform a bitwise operation on their operands.
218
218
Their operands must be integral types.
219
- First, the default integral promotions are done. Then, the bitwise
219
+ First, the $(USUAL_ARITHMETIC_CONVERSIONS) are done. Then, the bitwise
220
220
operation is done.
221
221
)
222
222
@@ -272,7 +272,7 @@ $(GNAME EqualExpression):
272
272
$(P Equality expressions compare the two operands for equality ($(D ==))
273
273
or inequality ($(D !=)).
274
274
The type of the result is $(D bool). The operands
275
- go through the usual conversions to bring them to a common type before
275
+ undergo the $(USUAL_ARITHMETIC_CONVERSIONS) to bring them to a common type before
276
276
comparison.
277
277
)
278
278
@@ -345,7 +345,7 @@ $(GNAME IdentityExpression):
345
345
$(P The $(D is) compares for identity.
346
346
To compare for nonidentity, use $(D e1 !is e2).
347
347
The type of the result is $(D bool). The operands
348
- go through the usual conversions to bring them to a common type before
348
+ undergo the $(USUAL_ARITHMETIC_CONVERSIONS) to bring them to a common type before
349
349
comparison.
350
350
)
351
351
@@ -379,7 +379,7 @@ $(GNAME RelExpression):
379
379
$(GLINK ShiftExpression) $(D >=) $(GLINK ShiftExpression)
380
380
)
381
381
382
- $(P First, the integral promotions are done on the operands.
382
+ $(P First, the $(USUAL_ARITHMETIC_CONVERSIONS) are done on the operands.
383
383
The result type of a relational expression is $(D bool).
384
384
)
385
385
@@ -495,8 +495,8 @@ $(GNAME ShiftExpression):
495
495
$(I ShiftExpression) $(D >)$(D >)$(D >) $(GLINK AddExpression)
496
496
)
497
497
498
- $(P The operands must be integral types, and undergo the usual integral
499
- promotions. The result type is the type of the left operand after
498
+ $(P The operands must be integral types, and undergo the $(USUAL_ARITHMETIC_CONVERSIONS).
499
+ The result type is the type of the left operand after
500
500
the promotions. The result value is the result of shifting the bits
501
501
by the right operand's value.
502
502
)
@@ -524,14 +524,14 @@ $(GNAME AddExpression):
524
524
$(GLINK CatExpression)
525
525
)
526
526
527
- $(P If the operands are of integral types, they undergo integral
528
- promotions, and then are brought to a common type using the
529
- usual arithmetic conversions .
527
+ $(P If the operands are of integral types, they undergo the $(USUAL_ARITHMETIC_CONVERSIONS),
528
+ and then are brought to a common type using the
529
+ $(USUAL_ARITHMETIC_CONVERSIONS) .
530
530
)
531
531
532
532
$(P If either operand is a floating point type, the other is implicitly
533
533
converted to floating point and they are brought to a common type
534
- via the usual arithmetic conversions .
534
+ via the $(USUAL_ARITHMETIC_CONVERSIONS) .
535
535
)
536
536
537
537
$(P If the operator is $(D +) or $(D -), and
@@ -591,9 +591,8 @@ $(GNAME MulExpression):
591
591
$(I MulExpression) $(D %) $(GLINK UnaryExpression)
592
592
)
593
593
594
- $(P The operands must be arithmetic types. They undergo integral
595
- promotions, and then are brought to a common type using the
596
- usual arithmetic conversions.
594
+ $(P The operands must be arithmetic types.
595
+ They undergo the $(USUAL_ARITHMETIC_CONVERSIONS).
597
596
)
598
597
599
598
$(P For integral operands, the $(D *), $(D /), and $(D %)
@@ -647,7 +646,7 @@ $(GNAME ComplementExpression):
647
646
All the bits in the value are complemented.
648
647
)
649
648
650
- $(P $(B Note:) the usual integral promotions are not performed
649
+ $(P $(B Note:) the usual $(INTEGER_PROMOTIONS) are not performed
651
650
prior to the complement operation.
652
651
)
653
652
@@ -2173,4 +2172,6 @@ Macros:
2173
2172
CHAPTER=10
2174
2173
TITLE=Expressions
2175
2174
IDENTIFIER=$(GLINK2 lex, Identifier)
2175
+ USUAL_ARITHMETIC_CONVERSIONS=$(DDSUBLINK spec/types, usual-arithmetic-conversions, Usual Arithmetic Conversions)
2176
+ INTEGER_PROMOTIONS=$(DDSUBLINK spec/types, integer-promotions, Integer Promotions)
2176
2177
_=
0 commit comments