Skip to content

Commit

Permalink
[0017] Update proposal with details on integers (#185)
Browse files Browse the repository at this point in the history
This adds the details for the C integer literal rules that this proposal
intends to adopt.
  • Loading branch information
llvm-beanz authored Apr 2, 2024
1 parent e58215d commit ce33e9a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions proposals/0017-conforming-literals.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,12 @@ which states:
This proposal adopts this behavior for floating literals.

Similarly this proposal adopts 32-bit integer as the default representation for
integer literals.
Similarly this proposal adopts C rules for non-suffixed integer literals. The
type of a base-10 non-suffixed integer literal is the first integer type from
the list [`int32_t`, `int64_t`] which can represent the specified literal value.
The type of an octal, hexadecimal or binary non-suffixed integer literal is the
first type from the list [`int32_t`, `uint32_t`, `int64_t`, `uint64_t`] that can
represent the specified literal value.

### Benefits of this solution

Expand Down

0 comments on commit ce33e9a

Please sign in to comment.