Skip to content

Commit 8bc9553

Browse files
authored
fix Issue 23712 - ImportC: Unclear documentation of what type is inferred from integer literals (type of 9223372036854775808 is undefined) (#3730)
1 parent e7d444e commit 8bc9553

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

spec/importc.dd

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,12 @@ enum E { A = 3; }
608608

609609
$(P A control-Z character `\x1A` in the source text means End Of File.)
610610

611+
$(H3 $(LNAME2 largeDecimal, Signed Integer Literal Larger Than long long))
612+
613+
$(P A signed integer constant with no suffix that is larger than a `long long` type,
614+
but will fit into an `unsigned long long` type, is accepted and typed as `unsigned long long`.
615+
This matches D behavior.)
616+
611617
$(H2 $(LNAME2 gnu-clang-extensions, Gnu and Clang Extensions))
612618

613619
$(P `gcc` and `clang` are presumed to have the same behavior w.r.t. extensions,

0 commit comments

Comments
 (0)