-
Notifications
You must be signed in to change notification settings - Fork 778
P3348R4 C++26 should refer to C23 not C17 #8011
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -220,18 +220,33 @@ | |
\rSec1[depr.c.macros]{Deprecated C macros} | ||
|
||
\pnum | ||
The header \libheaderref{stdalign.h} has the following macros: | ||
The header \libheaderref{cfloat} has the following macros: | ||
\begin{codeblock} | ||
#define @\libxmacro{alignas_is_defined}@ 1 | ||
#define @\libxmacro{alignof_is_defined}@ 1 | ||
#define @\libmacro{FLT_HAS_SUBNORM}@ @\seebelow@ | ||
#define @\libmacro{DBL_HAS_SUBNORM}@ @\seebelow@ | ||
#define @\libmacro{LDBL_HAS_SUBNORM}@ @\seebelow@ | ||
#define @\libmacro{DECIMAL_DIG}@ @\seebelow@ | ||
\end{codeblock} | ||
The header defines these macros the same as | ||
the C standard library header \libheader{float.h}. | ||
|
||
\xrefc{5.2.4.2.2, 7.33.5} | ||
|
||
\pnum | ||
In addition to being available via inclusion of the \libheader{cfloat} header, | ||
the macros \tcode{INFINITY} and \tcode{NAN} are | ||
available when \libheaderref{cmath} is included. | ||
Comment on lines
+236
to
+238
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Out of curiosity, why is it |
||
|
||
\xrefc{7.12} | ||
|
||
\pnum | ||
The header \libheaderref{stdbool.h} has the following macro: | ||
\begin{codeblock} | ||
#define @\libxmacro{bool_true_false_are_defined}@ 1 | ||
\end{codeblock} | ||
|
||
\xrefc{7.19} | ||
|
||
\rSec1[depr.cerrno]{Deprecated error numbers} | ||
|
||
\pnum | ||
|
@@ -762,6 +777,21 @@ | |
Equivalent to: \tcode{return visit(std::forward<Visitor>(vis), arg.value);} | ||
\end{itemdescr} | ||
|
||
\rSec1[depr.ctime]{Deprecated time formatting} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The paper titles this subclause
I assume the change is intentional? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No the paper has "D.? Deprecated [depr.ctime]" and then "D.?.? Header synopsis [depr.ctime.syn]". As noted in the commit msg, the D.?.? subclause has been dissolved, so there's only D.? here, so strictly speaking the paper titled it "Deprecated". "Deprecated" is a terrible name (I think I meant to write something there and apparently forgot). And "Header synopsis" only made sense for an rSec2 title, not the rSec1 title. So this change seems necessary. |
||
|
||
\pnum | ||
The header \libheaderref{ctime} has the following additions: | ||
\begin{codeblock} | ||
char* asctime(const tm* timeptr); | ||
char* ctime(const time_t* timer); | ||
\end{codeblock} | ||
|
||
\pnum | ||
The functions \tcode{asctime} and \tcode{ctime} | ||
are not required to avoid data races\iref{res.on.data.races}. | ||
|
||
\xrefc{7.29} | ||
|
||
\rSec1[depr.fs.path.factory]{Deprecated filesystem path factory functions} | ||
|
||
\pnum | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -2022,12 +2022,10 @@ | |||||
\indexlibraryglobal{aligned_alloc}% | ||||||
\indexlibraryglobal{calloc}% | ||||||
\indexlibraryglobal{malloc}% | ||||||
\indexlibraryglobal{realloc}% | ||||||
\begin{itemdecl} | ||||||
void* aligned_alloc(size_t alignment, size_t size); | ||||||
void* calloc(size_t nmemb, size_t size); | ||||||
void* malloc(size_t size); | ||||||
void* realloc(void* ptr, size_t size); | ||||||
\end{itemdecl} | ||||||
|
||||||
\begin{itemdescr} | ||||||
|
@@ -2045,8 +2043,35 @@ | |||||
These functions implicitly create objects\iref{intro.object} | ||||||
in the returned region of storage and | ||||||
return a pointer to a suitable created object. | ||||||
In the case of \tcode{calloc} and \tcode{realloc}, | ||||||
the objects are created before the storage is zeroed or copied, respectively. | ||||||
In the case of \tcode{calloc}, | ||||||
the objects are created before the storage is zeroed. | ||||||
\end{itemdescr} | ||||||
|
||||||
\indexlibraryglobal{realloc}% | ||||||
\begin{itemdecl} | ||||||
void* realloc(void* ptr, size_t size) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
\end{itemdecl} | ||||||
|
||||||
\begin{itemdescr} | ||||||
\pnum | ||||||
\expects | ||||||
\tcode{free(ptr)} has well-defined behavior. | ||||||
|
||||||
\pnum | ||||||
\effects | ||||||
If \tcode{ptr} is not null and \tcode{size} is zero, | ||||||
the behavior is erroneous and the effects are implementation-defined. | ||||||
Otherwise, this function has the semantics specified in the C standard library. | ||||||
|
||||||
\pnum | ||||||
\remarks | ||||||
This function does not attempt to allocate storage | ||||||
by calling \tcode{::operator new()}\iref{new.delete}. | ||||||
When a non-null pointer is returned, | ||||||
this function implicitly creates objects\iref{intro.object} | ||||||
in the returned region of storage and | ||||||
returns a pointer to a suitable created object. | ||||||
The objects are created before the storage is copied. | ||||||
\end{itemdescr} | ||||||
|
||||||
\indexlibraryglobal{free}% | ||||||
|
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.
The paper has "Memory" with uppercase M but it seems that is wrong and it should indeed be lowercase. But "C.1.2 Clause 5: Lexical conventions" is wrong in the current WP.