Enable MOZ_FORMAT_PRINTF in Windows builds
Categories
(Core :: General, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox102 | --- | fixed |
People
(Reporter: glandium, Assigned: glandium)
References
Details
Attachments
(13 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
| Assignee | ||
Comment 1•3 years ago
|
||
| Assignee | ||
Comment 2•3 years ago
|
||
| Assignee | ||
Comment 3•3 years ago
|
||
Using %0p raises the following error when printf annotations are enabled:
error: flag '0' results in undefined behavior with 'p' conversion specifier
| Assignee | ||
Comment 4•3 years ago
|
||
| Assignee | ||
Comment 5•3 years ago
|
||
| Assignee | ||
Comment 6•3 years ago
|
||
| Assignee | ||
Comment 7•3 years ago
|
||
Unfortunately, while with MSVC one would use the I modifier to format
LPARAM/LONG_PTR, it doesn't work with clang-cl on 32-bits, because
LONG_PTR there is long, but I expects an int.
| Assignee | ||
Comment 8•3 years ago
|
||
| Assignee | ||
Comment 9•3 years ago
|
||
| Assignee | ||
Comment 10•3 years ago
|
||
With MOZ_FORMAT_PRINTF annotations, the compiler expects a wchar_t*, and
it won't automatically consider char16ptr_t to be compatible with that.
While handling strings, there's one case of formatting that doesn't need
to use %S at all.
| Assignee | ||
Comment 11•3 years ago
|
||
| Assignee | ||
Comment 12•3 years ago
|
||
- Missing/Extra formatting directives
- Typos in formatting directives
- Non-literal strings used as formatting strings
- Wrong types passed as argument
- Swapped arguments
- Commas between parts of unique formatting strings
| Assignee | ||
Comment 13•3 years ago
|
||
clang-cl doesn't define GNUC. Also for some reason, clang-cl doesn't
like the use of MOZ_FORMAT_PRINTF on a function definition (while clang
is apparently happy with it).
Comment 14•3 years ago
|
||
Comment 15•3 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/a6ecfc4bb04e
https://hg.mozilla.org/mozilla-central/rev/d5c6d85c4bac
https://hg.mozilla.org/mozilla-central/rev/e8da2626eb78
https://hg.mozilla.org/mozilla-central/rev/9a91f6d0586e
https://hg.mozilla.org/mozilla-central/rev/7e166ba7f2a8
https://hg.mozilla.org/mozilla-central/rev/6395d8b4c146
https://hg.mozilla.org/mozilla-central/rev/d544976715e1
https://hg.mozilla.org/mozilla-central/rev/1f8659bc50a2
https://hg.mozilla.org/mozilla-central/rev/ecf8a55ccad1
https://hg.mozilla.org/mozilla-central/rev/b8a9e8c33b90
https://hg.mozilla.org/mozilla-central/rev/667cc7160e4a
https://hg.mozilla.org/mozilla-central/rev/50248597686a
https://hg.mozilla.org/mozilla-central/rev/803df6c16113
Description
•