Skip to content

Commit

Permalink
[conv.(prom, fpprom, integral, double)] Fix promotion conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
sdkrystian committed Apr 29, 2020
1 parent ea10e25 commit bc7a8d9
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions source/expressions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -884,20 +884,17 @@

\pnum
\indextext{conversion!bool@\tcode{bool}}%
If the destination type is \tcode{bool}, see~\ref{conv.bool}. If the
source type is \tcode{bool}, the value \tcode{false} is converted to
zero and the value \tcode{true} is converted to one.

\pnum
\indextext{conversion!to unsigned}%
\indextext{conversion!to signed}%
If the source type is \tcode{bool}, the value \tcode{false} is converted to
zero and the value \tcode{true} is converted to one.
Otherwise, the result is the unique value of the destination type
that is congruent to the source integer modulo $2^N$,
where $N$ is the width of the destination type.

\pnum
The conversions allowed as integral promotions are excluded from the set
of integral conversions.
The conversions performed by integral promotions and boolean conversions are
excluded from the set of integral conversions.

\rSec2[conv.double]{Floating-point conversions}

Expand All @@ -912,7 +909,7 @@
Otherwise, the behavior is undefined.

\pnum
The conversions allowed as floating-point promotions are excluded from
The conversion performed by floating-point promotion is excluded from
the set of floating-point conversions.

\rSec2[conv.fpint]{Floating-integral conversions}
Expand Down

0 comments on commit bc7a8d9

Please sign in to comment.