From Jason Turner

[cstdarg.syn]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpmfg6n2_a/{from.md → to.md} +10 -14
tmp/tmpmfg6n2_a/{from.md → to.md} RENAMED
@@ -1,32 +1,28 @@
1
  ### Header `<cstdarg>` synopsis <a id="cstdarg.syn">[[cstdarg.syn]]</a>
2
 
3
  ``` cpp
4
  // all freestanding
 
 
5
  namespace std {
6
  using va_list = see below;
7
  }
8
 
9
  #define va_arg(V, P) see below
10
  #define va_copy(VDST, VSRC) see below
11
  #define va_end(V) see below
12
- #define va_start(V, P) see below
13
  ```
14
 
15
  The contents of the header `<cstdarg>` are the same as the C standard
16
  library header `<stdarg.h>`, with the following changes:
17
 
18
- - In lieu of the default argument promotions specified in ISO C 6.5.2.2,
19
- the definition in  [[expr.call]] applies.
20
- - The restrictions that ISO C places on the second parameter to the
21
- `va_start` macro in header `<stdarg.h>` are different in this
22
- document. The parameter `parmN` is the rightmost parameter in the
23
- variable parameter list of the function definition (the one just
24
- before the `...`).[^33] If the parameter `parmN` is a pack expansion
25
- [[temp.variadic]] or an entity resulting from a lambda capture
26
- [[expr.prim.lambda]], the program is ill-formed, no diagnostic
27
- required. If the parameter `parmN` is of a reference type, or of a
28
- type that is not compatible with the type that results when passing an
29
- argument for which there is no parameter, the behavior is undefined.
30
 
31
- See also: ISO C 7.16.1.1
32
 
 
1
  ### Header `<cstdarg>` synopsis <a id="cstdarg.syn">[[cstdarg.syn]]</a>
2
 
3
  ``` cpp
4
  // all freestanding
5
+ #define __STDC_VERSION_STDARG_H__ 202311L
6
+
7
  namespace std {
8
  using va_list = see below;
9
  }
10
 
11
  #define va_arg(V, P) see below
12
  #define va_copy(VDST, VSRC) see below
13
  #define va_end(V) see below
14
+ #define va_start(V, ...) see below
15
  ```
16
 
17
  The contents of the header `<cstdarg>` are the same as the C standard
18
  library header `<stdarg.h>`, with the following changes:
19
 
20
+ - In lieu of the default argument promotions specified in ISO/IEC
21
+ 9899:2018 (C) 6.5.3.3, the definition in  [[expr.call]] applies.
22
+ - The preprocessing tokens comprising the second and subsequent
23
+ arguments to `va_start` (if any) are discarded. \[*Note 1*: `va_start`
24
+ accepts a second argument for compatibility with prior revisions of
25
+ C++. *end note*]
 
 
 
 
 
 
26
 
27
+ See also: ISO C 7.16
28