-
Notifications
You must be signed in to change notification settings - Fork 763
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[cstdint, cinttypes.syn] Reorganize <cstdint> presentation #843
Conversation
source/support.tex
Outdated
#define UINT@\placeholdernc{N}@_C(value) @\seebelow@ | ||
|
||
#define INTMAX_C(value) @\seebelow@ | ||
#define UINTMAX_C(value) @\seebelow@ | ||
\end{codeblock} | ||
|
||
\pnum | ||
The header defines all types and macros the same as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this has changed the meaning, but I'm not sure whether the old or new wording matches the intent. We used to definitively say that the C++ header definitely defines these macros for N in 8, 16, 32, 64, and in no other cases. C says something quite different -- those macros are defined if there happen to be types of those widths, and other macros can also be defined if there are types of other widths.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does C++ not actually allow other values of N at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zygoloid: updated version pushed that lists the four sizes that we support explicitly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zygoloid: Ping
|
||
\pnum | ||
The header also defines numerous macros of the form: | ||
#define INT[8, 16, 32, 64]_MIN @\seebelow@ // optional |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These did not appear to be optional before.
I do not think we can fix this editorially; we need to ask LWG what they meant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These macros are supposed to expand to expressions of their corresponding type. Since the corresponding type is optional, surely the macro must also be optional?
But indeed the LEAST/FAST macros should absolutely not be optional, that's a mistake that I will fix at once.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will open an LWG issue to have the question settled of whether the macros are optional.
b2c1c16
to
9739703
Compare
342b592
to
a514c40
Compare
source/iostreams.tex
Outdated
@@ -14984,7 +14984,7 @@ | |||
\indexlibrary{\idxcode{SCNuPTR}}% | |||
\indexlibrary{\idxcode{SCNxPTR}}% | |||
\begin{codeblock} | |||
#include <cstdint> | |||
#include <cstdint> // see \ref{cstdint} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that comment aligned to one of your preferred columns?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me check. Preferred columns are 20, 32, 48, 24.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
source/support.tex
Outdated
@@ -1306,7 +1306,7 @@ | |||
|
|||
\rSec1[cstdint]{Integer types} | |||
|
|||
\rSec2[cstdint.syn]{Header \tcode{<cstdint>} synopsis} | |||
\synopsis{Header \tcode{<cstdint>} synopsis} | |||
\indextext{\idxhdr{cstdint}}% |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I'll rebase this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebased, not sure how to avoid the pointless substructure.
source/support.tex
Outdated
\end{codeblock} | ||
|
||
\pnum | ||
The header defines all types and macros the same as | ||
the C standard library header \tcode{<stdint.h>}. | ||
|
||
\xref ISO C~7.20. | ||
|
||
\rSec1[support.start.term]{Start and termination} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems a good addition that can go in ahead of time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in edd2c5f.
5c10b40
to
9155f47
Compare
source/support.tex
Outdated
using int8_t = @\textit{signed integer type}@; // optional | ||
using int16_t = @\textit{signed integer type}@; // optional | ||
using int32_t = @\textit{signed integer type}@; // optional | ||
using int64_t = @\textit{signed integer type}@; // optional | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please put in the whitespace fixes right away? This makes the "hard" parts easier to spot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, will do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverting those changes for now, since they don't take italic correction into account, either. Once we have direction, I'll separate cosmetic and substantive change.
|
||
plus function macros of the form: | ||
#define INT_FAST[8, 16, 32, 64]_MIN @\seebelow@ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems worse: the never-defined pattern-matching language of "INT_[FAST LEAST]{8 16 32 64}_MIN" is both changed and used in what would otherwise be a preprocessor directive (rather than prose).
9b73aae
to
8f65e52
Compare
c0519f4
to
900408e
Compare
e3dbfe2
to
1a21a65
Compare
Any day now, seriously. |
2bbf3ca
to
445f515
Compare
dfc71b8
to
8e899df
Compare
@mclow, @jensmaurer: This has been resolved by LWG2820 via 2020-11 Motion LWG-3. Thank you all for your continued support! |
<cstdint>
synopsis" to\synopsis
.<cinttypes>
synopsis.