Skip to content

Commit

Permalink
Update conversion ranks for minimum precision types
Browse files Browse the repository at this point in the history
This just updates the conversion rank for minimum precision types which
are now represented in the Basic.types section.

TL;DR:

min10int < min12int < min16int < int16_t < int32_t < int64_t
min10uint < min12uint < min16uint < uint16_t < uint32_t < uint64_t
min10float < min12float < min16float < half < float < double
  • Loading branch information
llvm-beanz committed Apr 19, 2024
1 parent 7f2de05 commit 2ba23f8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
14 changes: 9 additions & 5 deletions specs/language/basic.tex
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,15 @@
minimum precision unsigned integer types are collectively called
\textit{unsigned integer types}.

\p The signed integer types and unsigned integer types are collectively called
\textit{integer types}. Integer types inherit the object representation of
integers defined in \glsdesc{isoC23}\footnote{C23 adopts two's compliment as the
object representation for integer types.}. Integer types shall satisfy the
constraints defined in \glsdesc{isoCPP}, section \textbf{basic.fundamental}.
\p The minimum precision signed integer types and minimum precision unsigned
integer types are collectively called \textit{minimum precision integer types}.
The standard signed integer types and standard unsigned integer types are
collectively called \textit{standard integer types}. The signed integer types
and unsigned integer types are collectively called \textit{integer types}.
Integer types inherit the object representation of integers defined in
\glsdesc{isoC23}\footnote{C23 adopts two's compliment as the object
representation for integer types.}. Integer types shall satisfy the constraints
defined in \glsdesc{isoCPP}, section \textbf{basic.fundamental}.

\p There are three \textit{standard floating point types}: \texttt{half},
\texttt{float}, and \texttt{double}. The \texttt{float} type is a 32-bit
Expand Down
10 changes: 10 additions & 0 deletions specs/language/conversions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@
corresponding signed integer type.
\item The rank of \texttt{bool} shall be less than the rank of all other
standard integer types.
\item The rank of a minimum precision integer type shall be less than the rank
of any other minimum precision integer type with a larger minimum value
representation size.
\item The rank of a minimum precision integer type shall be less than the rank
of all standard integer types.
\item For all integer types \texttt{T1}, \texttt{T2}, and \texttt{T3}: if
\texttt{T1} has greater rank than \texttt{T2} and \texttt{T2} has greater rank
than \texttt{T3}, then \texttt{T1} shall have greater rank than \texttt{T3}.
Expand All @@ -172,6 +177,11 @@
\item The rank of a floating point type shall be greater than the rank of any
floating point type with a smaller size.
\item The rank \texttt{float} shall be greater than the rank of \texttt{half}.
\item The rank of a minimum precision floating point type shall be less than
the rank of any other minimum precision floating point type with a larger
minimum value representation size.
\item The rank of a minimum precision floating point type shall be less than
the rank of all standard floating point types.
\item For all floating point types \texttt{T1}, \texttt{T2}, and \texttt{T3}:
if \texttt{T1} has greater rank than \texttt{T2} and \texttt{T2} has greater
rank than \texttt{T3}, then \texttt{T1} shall have greater rank than
Expand Down

0 comments on commit 2ba23f8

Please sign in to comment.