Skip to content

Commit 888c37b

Browse files
[spec/attribute.dd] Add align(default) (#4153)
1 parent 9de74c4 commit 888c37b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

spec/attribute.dd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ $(H2 $(LNAME2 align, $(D align) Attribute))
242242

243243
$(GRAMMAR
244244
$(GNAME AlignAttribute):
245+
$(D align $(LPAREN) default $(RPAREN))
245246
$(D align)
246247
$(D align) $(D $(LPAREN)) $(GLINK2 expression, AssignExpression) $(D $(RPAREN))
247248
)
@@ -257,15 +258,14 @@ $(GNAME AlignAttribute):
257258
$(LI struct, union, and class types)
258259
)
259260

260-
$(P $(D align) by itself
261-
sets it to the default, which matches the default member alignment
262-
of the companion C compiler.)
261+
$(P $(D align $(LPAREN) default $(RPAREN)) (re)sets it to the default, which matches the default member alignment
262+
of the companion C compiler. $(D align) by itself is the same as $(D align $(LPAREN) default $(RPAREN)).)
263263

264264
$(SPEC_RUNNABLE_EXAMPLE_COMPILE
265265
--------
266266
struct S
267267
{
268-
align:
268+
align(default): // same as `align:`
269269
byte a; // placed at offset 0
270270
int b; // placed at offset 4
271271
long c; // placed at offset 8

0 commit comments

Comments
 (0)