Skip to content

Commit cc78807

Browse files
committed
Fix Issue 8107 - Float literals are not specified as they are implemented
1 parent 0da8084 commit cc78807

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

spec/lex.dd

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -923,6 +923,16 @@ $(GNAME LeadingDecimal):
923923
It is not an error if the literal is rounded to fit into
924924
the significant digits of the type.
925925
)
926+
$(P If a floating literal has a $(B .) and a type suffix, at least one
927+
digit must be in-between:)
928+
929+
---------
930+
1f; // OK
931+
1.f; // forbidden
932+
1d; // OK
933+
1.d; // forbidden
934+
1.; // OK, int
935+
---------
926936

927937
$(P Complex literals are not tokens, but are assembled from
928938
real and imaginary expressions during semantic analysis:

0 commit comments

Comments
 (0)