-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes regression #17121; adding doc comment in importc proc makes it …
…silently noop at CT (#20766) * fixes regression #17121; adding doc comment in importc proc makes it silently noop at CT * Update compiler/vmgen.nim Co-authored-by: Andreas Rumpf <[email protected]> (cherry picked from commit a228e33)
- Loading branch information
Showing
2 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
discard """ | ||
errormsg: "cannot 'importc' variable at compile time; c_printf" | ||
""" | ||
|
||
proc c_printf*(frmt: cstring): cint {.importc: "printf", header: "<stdio.h>", varargs, discardable.} = | ||
## foo bar | ||
runnableExamples: discard | ||
static: | ||
let a = c_printf("abc\n") |