Skip to content

Commit de80d34

Browse files
WalterBrightdlang-bot
authored andcommitted
fix ImportC: Can use -> operator on non-pointer
1 parent 962784a commit de80d34

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

spec/importc.dd

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,14 @@ enum E { A = 3; }
612612

613613
$(P A signed integer constant with no suffix that is larger than a `long long` type,
614614
but will fit into an `unsigned long long` type, is accepted and typed as `unsigned long long`.
615-
This matches D behavior.)
615+
This matches D behavior, and that of some C compilers.)
616+
617+
$(H3 $(LNAME2 dotArrow, Dot and Arror Operators))
618+
619+
$(P The `.` operator is used to designate a member of a struct or union value.
620+
The `->` operator is used to designate a member of a struct or union value pointed to
621+
by a pointer. The extension is that `.` and `->` can be used interchangeably on
622+
values and pointers. This matches D's behavior for `.`.)
616623

617624
$(H2 $(LNAME2 gnu-clang-extensions, Gnu and Clang Extensions))
618625

0 commit comments

Comments
 (0)