document printf format validation#2760
Conversation
|
Thanks for your pull request, @WalterBright! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. |
spec/betterc.dd
Outdated
| $(LI `switch` with strings) | ||
| $(LI `final switch`) | ||
| $(LI `unittest`) | ||
| $(DDSUBLINK spec/interfaceToC, calling_printf, `printf` format validation) |
There was a problem hiding this comment.
Needs to be wrapped in $(LI ... ) as it's part of $(OL ... ) (ordered html list). I'll fix it myself.
There was a problem hiding this comment.
175ea2c to
09364b2
Compare
PetarKirov
left a comment
There was a problem hiding this comment.
LGTM. Feel free to add the auto-merge label to the PR when ready.
| ) | ||
| --- | ||
| string format = "value: %K\n"; | ||
| printf(format, value); |
There was a problem hiding this comment.
I very much doubt that will actually compile. Have you tested it?
I believe it will have to be format.ptr...
There was a problem hiding this comment.
Probably better to make the original format variable const char* so it gets properly null-terminated.
Rewrote the section about calling
printfto support its implementation dlang/dmd#10812