From Jason Turner

[cstdarg.syn]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpui7rcyaa/{from.md → to.md} +15 -11
tmp/tmpui7rcyaa/{from.md → to.md} RENAMED
@@ -1,8 +1,9 @@
1
  ### Header `<cstdarg>` synopsis <a id="cstdarg.syn">[[cstdarg.syn]]</a>
2
 
3
  ``` cpp
 
4
  namespace std {
5
  using va_list = see below;
6
  }
7
 
8
  #define va_arg(V, P) see below
@@ -10,19 +11,22 @@ namespace std {
10
  #define va_end(V) see below
11
  #define va_start(V, P) see below
12
  ```
13
 
14
  The contents of the header `<cstdarg>` are the same as the C standard
15
- library header `<stdarg.h>`, with the following changes: The
16
- restrictions that ISO C places on the second parameter to the `va_start`
17
- macro in header `<stdarg.h>` are different in this document. The
18
- parameter `parmN` is the rightmost parameter in the variable parameter
19
- list of the function definition (the one just before the `...`).[^35] If
20
- the parameter `parmN` is a pack expansion [[temp.variadic]] or an entity
21
- resulting from a lambda capture [[expr.prim.lambda]], the program is
22
- ill-formed, no diagnostic required. If the parameter `parmN` is of a
23
- reference type, or of a type that is not compatible with the type that
24
- results when passing an argument for which there is no parameter, the
25
- behavior is undefined.
 
 
 
26
 
27
  See also: ISO C 7.16.1.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
 
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