File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -236,6 +236,28 @@ $(H2 $(LNAME2 extensions, Extensions))
236
236
$(P Functions for which the function body is present can
237
237
be inlined by ImportC as well as by the D code that calls them.)
238
238
239
+ $(H3 $(LNAME2 enumbasetype, Enum Base Types))
240
+
241
+ $(P Enums are extended with an optional $(I EnumBaseType):)
242
+
243
+ $(GRAMMAR
244
+ $(GNAME EnumDeclaration):
245
+ $(D enum) $(GLINK Identifier) $(D :) $(GLINK EnumBaseType) $(GLINK EnumBody)
246
+
247
+ $(GNAME EnumBaseType):
248
+ $(GLINK Type)
249
+ )
250
+
251
+ $(P which, when supplied, causes the enum members to be implicitly cast to the
252
+ $(I EnumBaseType).
253
+ )
254
+
255
+ $(CCODE
256
+ enum S : byte { A };
257
+ _Static_assert(sizeof(A) == 1, "A should be size 1");
258
+ )
259
+
260
+
239
261
$(H3 $(LNAME2 register, Register Storage Class))
240
262
241
263
$(P Objects with `register` storage class are treated as `auto` declarations.)
You can’t perform that action at this time.
0 commit comments