Skip to content

Commit

Permalink
Clarify the representation of Boolean value true (#898)
Browse files Browse the repository at this point in the history
* Add text about true's representation

* Add new unspecified entry
  • Loading branch information
RexJaeschke authored Aug 17, 2023
1 parent 5ea676b commit fc6b084
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions standard/portability-issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ A conforming implementation is required to document its choice of behavior in ea
## B.4 Unspecified behavior

1. The time at which the finalizer (if any) for an object is run, once that object has become eligible for finalization ([§7.9](basic-concepts.md#79-automatic-memory-management)).
1. The representation of `true` ([§8.3.9](types.md#839-the-bool-type)).
1. The value of the result when converting out-of-range values from `float` or `double` values to an integral type in an `unchecked` context ([§10.3.2](conversions.md#1032-explicit-numeric-conversions)).
1. The exact target object and target method of the delegate produced from an *anonymous_method_expression* contains ([§10.7.2](conversions.md#1072-evaluation-of-anonymous-function-conversions-to-delegate-types)).
1. The layout of arrays, except in an unsafe context ([§12.8.16.5](expressions.md#128165-array-creation-expressions)).
Expand Down
2 changes: 1 addition & 1 deletion standard/types.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ The `decimal` type has greater precision but may have a smaller range than the f
### 8.3.9 The Bool type
The `bool` type represents Boolean logical quantities. The possible values of type `bool` are `true` and `false`.
The `bool` type represents Boolean logical quantities. The possible values of type `bool` are `true` and `false`. The representation of `false` is described in [§8.3.3](types.md#833-default-constructors). Although the representation of `true` is unspecified, it shall be different from that of `false`.
No standard conversions exist between `bool` and other value types. In particular, the `bool` type is distinct and separate from the integral types, a `bool` value cannot be used in place of an integral value, and vice versa.
Expand Down

0 comments on commit fc6b084

Please sign in to comment.