Skip to content

Commit b263c68

Browse files
authored
improve documentation on importc.h and __builtins.di (#3733)
1 parent de80d34 commit b263c68

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

spec/importc.dd

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,9 @@ $(H2 $(LNAME2 preprocessor, Preprocessor))
150150
$(LI Otherwise the $(TT cpp) preprocessor will be used.)
151151
)
152152

153-
$(P The druntime file $(TT src/importc.h) will automatically be $(TT #include)d.)
153+
$(P The druntime file $(LINK2 https://github.com/dlang/dmd/blob/master/druntime/src/importc.h, $(TT src/importc.h))
154+
will automatically be $(TT #include)d first. $(TT importc.h) provides adjustments to the source code to
155+
account for various C compiler extensions not supported by ImportC.)
154156

155157
$(P The $(DDSUBLINK dmd, switch-v, $(TT -v)) switch can be used to observe the command
156158
that invokes the preprocessor.
@@ -279,6 +281,13 @@ $(H2 $(LNAME2 preprocessor-directives, Preprocessor Directives))
279281
$(LI $(TT #pragma pack ( pop PopList )))
280282
)
281283

284+
$(H2 $(LNAME2 _builtins, $(TT src/__builtins.di)))
285+
286+
$(P The first thing the compiler does when preprocessing is complete is to import
287+
$(LINK2 https://github.com/dlang/dmd/blob/master/druntime/src/__builtins.di, $(TT src/__builtins.di)).
288+
It provides support for various builtins provided by other C compilers.
289+
$(TT __builtins.di) is a D file.)
290+
282291
$(H2 $(LNAME2 implementation, Implementation))
283292

284293
$(P The implementation defined characteristics of ImportC are:)

0 commit comments

Comments
 (0)