X-Git-Url: http://nsz.repo.hu/git/?p=c-standard;a=blobdiff_plain;f=n1256.html;h=7513496a8f28fd2616a2c028ae8ec3150d8294d3;hp=c88b2e6dbc60e26f1e0a216ef73268bb2835d007;hb=d91a54200067e06b0499f3612315d997f6de0dad;hpb=6fa09ff7f9eb20582513c80f0fa883b056bde241 diff --git a/n1256.html b/n1256.html index c88b2e6..7513496 100644 --- a/n1256.html +++ b/n1256.html @@ -293,8 +293,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
Forward references: integer types <stdint.h> (7.18). -
The values given below shall be replaced by constant expressions suitable for use in #if preprocessing directives. Moreover, except for CHAR_BIT and MB_LEN_MAX, the @@ -1621,7 +1621,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
The characteristics of floating types are defined in terms of a model that describes a representation of floating-point numbers and values that provide information about an @@ -8810,7 +8810,7 @@ unsigned long long int
164) Thus, a signal handler cannot, in general, call standard library functions. -
The header <assert.h> defines the assert macro and refers to another macro,
@@ -8863,7 +8863,7 @@ unsigned long long int Assertion failed: expression, function abc, file xyz, line nnn. --7.3 Complex arithmetic
+7.3 Complex arithmetic <complex.h>
7.3.1 Introduction
@@ -9402,7 +9402,7 @@ unsigned long long int
171) For a variable z of complex type, z == creal(z) + cimag(z)*I. -
7.4 Character handling
+7.4 Character handling <ctype.h>
The header <ctype.h> declares several functions useful for classifying and mapping characters.172) In all cases the argument is an int, the value of which shall be @@ -9636,7 +9636,7 @@ unsigned long long int for any given locale); otherwise, the argument is returned unchanged. -
7.5 Errors
+7.5 Errors <errno.h>
The header <errno.h> defines several macros, all relating to the reporting of error conditions. @@ -9683,7 +9683,7 @@ unsigned long long int
177) See ''future library directions'' (7.26.3). -
7.6 Floating-point environment
+7.6 Floating-point environment <fenv.h>
The header <fenv.h> declares two types and several macros and functions to provide access to the floating-point environment. The floating-point environment refers @@ -10181,7 +10181,7 @@ unsigned long long int }
The header <float.h> defines several macros that expand to various limits and parameters of the standard floating-point types. @@ -10190,7 +10190,7 @@ unsigned long long int in 5.2.4.2.2. -
The header <inttypes.h> includes the header <stdint.h> and extends it with additional facilities provided by hosted implementations. @@ -10378,7 +10378,7 @@ unsigned long long int (7.24.4.1.2). -
The header <iso646.h> defines the following eleven macros (on the left) that expand to the corresponding tokens (on the right): @@ -10397,7 +10397,7 @@ unsigned long long int xor_eq ^= -
The header <limits.h> defines several macros that expand to various limits and parameters of the standard integer types. @@ -10406,7 +10406,7 @@ unsigned long long int in 5.2.4.2.1. -
The header <locale.h> declares two functions, one type, and defines several macros.
@@ -10766,7 +10766,7 @@ unsigned long long int -
The header <math.h> declares two types and many mathematical functions and defines several macros. Most synopses specify a family of functions consisting of a principal @@ -12317,7 +12317,7 @@ unsigned long long int The isunordered macro returns 1 if its arguments are unordered and 0 otherwise. -
The header <setjmp.h> defines the macro setjmp, and declares one function and one type, for bypassing the normal function call and return discipline.216) @@ -12448,7 +12448,7 @@ unsigned long long int
218) This includes, but is not limited to, the floating-point status flags and the state of open files. -
The header <signal.h> declares a type and two functions and defines several macros, for handling various signals (conditions that may be reported during program execution). @@ -12586,7 +12586,7 @@ unsigned long long int The raise function returns zero if successful, nonzero if unsuccessful. -
The header <stdarg.h> declares a type and defines four macros, for advancing through a list of arguments whose number and types are not known to the called function @@ -12778,7 +12778,7 @@ unsigned long long int } -
The header <stdbool.h> defines four macros.
@@ -12815,7 +12815,7 @@ unsigned long long int
222) See ''future library directions'' (7.26.7). -
The following types and macros are defined in the standard header <stddef.h>. Some are also defined in other headers, as noted in their respective subclauses. @@ -12864,7 +12864,7 @@ unsigned long long int
Forward references: localization (7.11). -
The header <stdint.h> declares sets of integer types having specified widths, and defines corresponding sets of macros.223) It also defines macros that specify limits of @@ -13222,7 +13222,7 @@ unsigned long long int UINTMAX_C(value) -
@@ -15328,7 +15328,7 @@ If a length modifier appears with any conversion specifier other than as specifi
Forward references: the strerror function (7.21.6.2). -
The header <stdlib.h> declares five types and several functions of general utility, and defines several macros.257) @@ -16243,7 +16243,7 @@ If a length modifier appears with any conversion specifier other than as specifi any.267) -
@@ -16746,7 +16746,7 @@ If a length modifier appears with any conversion specifier other than as specifi character. -
The header <tgmath.h> includes the headers <math.h> and <complex.h> and defines several type-generic macros. @@ -16878,7 +16878,7 @@ If a length modifier appears with any conversion specifier other than as specifi the behavior is undefined. -
@@ -17321,7 +17321,7 @@ If a length modifier appears with any conversion specifier other than as specifi zero is returned and the contents of the array are indeterminate. -
@@ -19461,7 +19461,7 @@ If a length modifier appears with any conversion specifier other than as specifi include those necessary to reach the initial shift state immediately before the null byte. -
@@ -19873,7 +19873,7 @@ If a length modifier appears with any conversion specifier other than as specifi The following names are grouped under individual headers for convenience. All external names described below are reserved no matter what headers are included by the program. -
The function names
@@ -19884,37 +19884,37 @@ If a length modifier appears with any conversion specifier other than as specifi and the same names suffixed with f or l may be added to the declarations in the <complex.h> header. --7.26.2 Character handling
+7.26.2 Character handling <ctype.h>
Function names that begin with either is or to, and a lowercase letter may be added to the declarations in the <ctype.h> header. -
7.26.3 Errors
+7.26.3 Errors <errno.h>
Macros that begin with E and a digit or E and an uppercase letter may be added to the declarations in the <errno.h> header. -
7.26.4 Format conversion of integer types
+7.26.4 Format conversion of integer types <inttypes.h>
Macro names beginning with PRI or SCN followed by any lowercase letter or X may be added to the macros defined in the <inttypes.h> header. -
7.26.5 Localization
+7.26.5 Localization <locale.h>
Macros that begin with LC_ and an uppercase letter may be added to the definitions in the <locale.h> header. -
7.26.6 Signal handling
+7.26.6 Signal handling <signal.h>
Macros that begin with either SIG and an uppercase letter or SIG_ and an uppercase letter may be added to the definitions in the <signal.h> header. -
7.26.7 Boolean type and values
+7.26.7 Boolean type and values <stdbool.h>
The ability to undefine and perhaps then redefine the macros bool, true, and false is an obsolescent feature. -
7.26.8 Integer types
+7.26.8 Integer types <stdint.h>
Typedef names beginning with int or uint and ending with _t may be added to the types defined in the <stdint.h> header. Macro names beginning with INT or UINT @@ -19922,7 +19922,7 @@ If a length modifier appears with any conversion specifier other than as specifi <stdint.h> header. -
7.26.9 Input/output
+7.26.9 Input/output <stdio.h>
Lowercase letters may be added to the conversion specifiers and length modifiers in fprintf and fscanf. Other characters may be used in extensions. @@ -19932,17 +19932,17 @@ If a length modifier appears with any conversion specifier other than as specifi The use of ungetc on a binary stream where the file position indicator is zero prior to the call is an obsolescent feature. -
7.26.10 General utilities
+7.26.10 General utilities <stdlib.h>
Function names that begin with str and a lowercase letter may be added to the declarations in the <stdlib.h> header. -
7.26.11 String handling
+7.26.11 String handling <string.h>
Function names that begin with str, mem, or wcs and a lowercase letter may be added to the declarations in the <string.h> header. -
7.26.12 Extended multibyte and wide character utilities
+7.26.12 Extended multibyte and wide character utilities <wchar.h>
Function names that begin with wcs and a lowercase letter may be added to the declarations in the <wchar.h> header. @@ -20790,13 +20790,13 @@ If a length modifier appears with any conversion specifier other than as specifi Library summary
NDEBUG void assert(scalar expression);-
@@ -20872,7 +20872,7 @@ If a length modifier appears with any conversion specifier other than as specifi long double creall(long double complex z);-
int isalnum(int c); int isalpha(int c); @@ -20890,12 +20890,12 @@ If a length modifier appears with any conversion specifier other than as specifi int toupper(int c);-
EDOM EILSEQ ERANGE errno-
fenv_t FE_OVERFLOW FE_TOWARDZERO @@ -20918,7 +20918,7 @@ If a length modifier appears with any conversion specifier other than as specifi int feupdateenv(const fenv_t *envp);-
FLT_ROUNDS DBL_MIN_EXP FLT_MAX FLT_EVAL_METHOD LDBL_MIN_EXP DBL_MAX @@ -20933,7 +20933,7 @@ If a length modifier appears with any conversion specifier other than as specifi FLT_MIN_EXP LDBL_MAX_10_EXP-
imaxdiv_t @@ -20960,14 +20960,14 @@ If a length modifier appears with any conversion specifier other than as specifi wchar_t ** restrict endptr, int base);-
and bitor not_eq xor and_eq compl or xor_eq bitand not or_eq-
CHAR_BIT CHAR_MAX INT_MIN ULONG_MAX SCHAR_MIN MB_LEN_MAX INT_MAX LLONG_MIN @@ -20976,7 +20976,7 @@ If a length modifier appears with any conversion specifier other than as specifi CHAR_MIN USHRT_MAX LONG_MAX-
struct lconv LC_ALL LC_CTYPE LC_NUMERIC NULL LC_COLLATE LC_MONETARY LC_TIME @@ -20984,7 +20984,7 @@ If a length modifier appears with any conversion specifier other than as specifi struct lconv *localeconv(void);-
jmp_buf int setjmp(jmp_buf env); void longjmp(jmp_buf env, int val);-
sig_atomic_t SIG_IGN SIGILL SIGTERM SIG_DFL SIGABRT SIGINT @@ -21202,7 +21202,7 @@ If a length modifier appears with any conversion specifier other than as specifi int raise(int sig);-
va_list type va_arg(va_list ap, type); @@ -21211,7 +21211,7 @@ If a length modifier appears with any conversion specifier other than as specifi void va_start(va_list ap, parmN);-
bool @@ -21220,13 +21220,13 @@ If a length modifier appears with any conversion specifier other than as specifi __bool_true_false_are_defined-
ptrdiff_t size_t wchar_t NULL offsetof(type, member-designator)-
intN_t INT_LEASTN_MIN PTRDIFF_MAX uintN_t INT_LEASTN_MAX SIG_ATOMIC_MIN @@ -21243,7 +21243,7 @@ If a length modifier appears with any conversion specifier other than as specifi UINTN_MAX PTRDIFF_MIN-
@@ -21323,7 +21323,7 @@ If a length modifier appears with any conversion specifier other than as specifi void perror(const char *s);-
@@ -21384,7 +21384,7 @@ If a length modifier appears with any conversion specifier other than as specifi const wchar_t * restrict pwcs, size_t n);-
size_t @@ -21420,7 +21420,7 @@ If a length modifier appears with any conversion specifier other than as specifi size_t strlen(const char *s);-
acos sqrt fmod nextafter asin fabs frexp nexttoward @@ -21439,7 +21439,7 @@ If a length modifier appears with any conversion specifier other than as specifi pow fmin nearbyint creal-
NULL size_t time_t @@ -21458,7 +21458,7 @@ If a length modifier appears with any conversion specifier other than as specifi const struct tm * restrict timeptr);-
@@ -21567,7 +21567,7 @@ If a length modifier appears with any conversion specifier other than as specifi mbstate_t * restrict ps);-
@@ -21630,100 +21630,68 @@ If a length modifier appears with any conversion specifier other than as specifi This table is reproduced unchanged from ISO/IEC TR 10176:1998, produced by ISO/IEC JTC 1/SC 22/WG 20, except for the omission of ranges that are part of the basic character sets. - Latin: 00AA, 00BA, 00C0-00D6, 00D8-00F6, 00F8-01F5, 01FA-0217, -+
Latin: | 00AA, 00BA, 00C0-00D6, 00D8-00F6, 00F8-01F5, 01FA-0217,
0250-02A8, 1E00-1E9B, 1EA0-1EF9, 207F
-
- Greek: 0386, 0388-038A, 038C, 038E-03A1, 03A3-03CE, 03D0-03D6,
-+ |
@@ -22214,61 +22182,39 @@ If a length modifier appears with any conversion specifier other than as specifiF.8.2 Expression transformations
- x / 2 <-> x * 0.5 Although similar transformations involving inexact -
+
x / 2 <-> x * 0.5 | Although similar transformations involving inexact
constants generally do not yield numerically equivalent
expressions, if the constants are exact then such
transformations can be made on IEC 60559 machines
and others that round perfectly.
-
- 1 * x and x / 1 -> x The expressions 1 * x, x / 1, and x are equivalent
-+ |
Footnotes
317) Strict support for signaling NaNs -- not required by this specification -- would invalidate these and
@@ -22290,10 +22236,10 @@ If a length modifier appears with any conversion specifier other than as specifi
F.8.3 Relational operators
- x != x -> false The statement x != x is true if x is a NaN. - x == x -> true The statement x == x is false if x is a NaN. - x < y -> isless(x,y) (and similarly for <=, >, >=) Though numerically -
+
x != x -> false | The statement x != x is true if x is a NaN. + |
x == x -> true | The statement x == x is false if x is a NaN. + |
x < y -> isless(x,y) | (and similarly for <=, >, >=) Though numerically equal, these expressions are not equivalent because of side effects when x or y is a NaN and the state of the FENV_ACCESS pragma is ''on''. This transformation, @@ -22301,7 +22247,7 @@ If a length modifier appears with any conversion specifier other than as specifi cause the ''invalid'' floating-point exception for unordered cases, could be performed provided the state of the FENV_ACCESS pragma is ''off''. - + |
@@ -22362,7 +22308,7 @@ If a length modifier appears with any conversion specifier other than as specifi
319) 0 - 0 yields -0 instead of +0 just when the rounding direction is downward. -
This subclause contains specifications of <math.h> facilities that are particularly suited for IEC 60559 implementations. @@ -23282,7 +23228,7 @@ If a length modifier appears with any conversion specifier other than as specifi x + iy (x (+-) u) + iy x + i(y (+-) v) (x (+-) u) + i(y (+-) v) -
The macros
@@ -23309,7 +23255,7 @@ If a length modifier appears with any conversion specifier other than as specifi and the result, the result has the same sign as the argument.The functions are continuous onto both sides of their branch cuts, taking into account the - sign of zero. For example, csqrt(-2 (+-) i0) = (+-)i(sqrt)2. ??? + sign of zero. For example, csqrt(-2 (+-) i0) = (+-)i(sqrt)(2).
Since complex and imaginary values are composed of real values, each function may be regarded as computing real values from real values. Except as noted, the functions treat @@ -23601,7 +23547,7 @@ If a length modifier appears with any conversion specifier other than as specifi -
G.7 Type-generic math
+G.7 Type-generic math <tgmath.h>
Type-generic macros that accept complex arguments also accept imaginary arguments. If an argument is imaginary, the macro expands to an expression whose type is real, @@ -23661,11 +23607,11 @@ If a length modifier appears with any conversion specifier other than as specifi only integer divide-by-zero need be detected.
The parameters for the integer data types can be accessed by the following: - maxint INT_MAX, LONG_MAX, LLONG_MAX, UINT_MAX, ULONG_MAX,
+ maxint INT_MAX, LONG_MAX, LLONG_MAX, UINT_MAX, ULONG_MAX, ULLONG_MAX -minint INT_MIN, LONG_MIN, LLONG_MIN +
The parameter ''bounded'' is always true, and is not provided. The parameter ''minint'' is always 0 for the unsigned types, and is not provided for those types. @@ -23674,6 +23620,7 @@ If a length modifier appears with any conversion specifier other than as specifi
The integer operations on integer types are the following: +
addI x + y subI x - y mulI x * y @@ -23687,6 +23634,7 @@ If a length modifier appears with any conversion specifier other than as specifi leqI x <= y gtrI x > y geqI x >= y +where x and y are expressions of the same integer type.
The parameters for a floating point data type can be accessed by the following: +
r FLT_RADIX p FLT_MANT_DIG, DBL_MANT_DIG, LDBL_MANT_DIG emax FLT_MAX_EXP, DBL_MAX_EXP, LDBL_MAX_EXP emin FLT_MIN_EXP, DBL_MIN_EXP, LDBL_MIN_EXP +
The derived constants for the floating point types are accessed by the following: +
fmax FLT_MAX, DBL_MAX, LDBL_MAX fminN FLT_MIN, DBL_MIN, LDBL_MIN epsilon FLT_EPSILON, DBL_EPSILON, LDBL_EPSILON rnd_style FLT_ROUNDS +
The floating-point operations on floating-point types are the following: +
addF x + y subF x - y mulF x * y @@ -23724,9 +23677,7 @@ If a length modifier appears with any conversion specifier other than as specifi absF fabsf(x), fabs(x), fabsl(x) exponentF 1.f+logbf(x), 1.0+logb(x), 1.L+logbl(x) scaleF scalbnf(x, n), scalbn(x, n), scalbnl(x, n), -where x and y are expressions of the same floating point type, n is of type int, and li is of type long int. @@ -23744,28 +23696,28 @@ If a length modifier appears with any conversion specifier other than as specifi that only one identifier for each is provided to map to LIA-1.scalblnf(x, li), scalbln(x, li), scalblnl(x, li) -intpartF modff(x, &y), modf(x, &y), modfl(x, &y) fractpartF modff(x, &y), modf(x, &y), modfl(x, &y) eqF x == y @@ -23735,6 +23686,7 @@ If a length modifier appears with any conversion specifier other than as specifi leqF x <= y gtrF x > y geqF x >= y +
The FLT_ROUNDS parameter can be used to indicate the LIA-1 rounding styles: +
truncate FLT_ROUNDS == 0 nearest FLT_ROUNDS == 1 other FLT_ROUNDS != 0 && FLT_ROUNDS != 1 +provided that an implementation extends FLT_ROUNDS to cover the rounding style used in all relevant LIA-1 operations, not just addition as in C.
The LIA-1 type conversions are the following type casts: - cvtI' -> I (int)i, (long int)i, (long long int)i,
+ cvtI' -> I (int)i, (long int)i, (long long int)i, (unsigned int)i, (unsigned long int)i, (unsigned long long int)i -cvtF -> I (int)x, (long int)x, (long long int)x, -
(unsigned int)x, (unsigned long int)x, (unsigned long long int)x -cvtI -> F (float)i, (double)i, (long double)i cvtF' -> F (float)x, (double)x, (long double)x +
In the above conversions from floating to integer, the use of (cast)x can be replaced with (cast)round(x), (cast)rint(x), (cast)nearbyint(x), (cast)trunc(x), @@ -23822,15 +23774,19 @@ If a length modifier appears with any conversion specifier other than as specifi C's <fenv.h> status flags are compatible with the LIA-1 indicators.
The following mapping is for floating-point types: +
undefined FE_INVALID, FE_DIVBYZERO floating_overflow FE_OVERFLOW underflow FE_UNDERFLOW +
The floating-point indicator interrogation and manipulation operations are: +
set_indicators feraiseexcept(i) clear_indicators feclearexcept(i) test_indicators fetestexcept(i) current_indicators fetestexcept(FE_ALL_EXCEPT) +where i is an expression of type int representing a subset of the LIA-1 indicators.
C allows an implementation to provide the following LIA-1 required behavior: at @@ -24976,9 +24932,9 @@ If a length modifier appears with any conversion specifier other than as specifi
- ??? x ???, 3.18 , (comma punctuator), 6.5.2, 6.7, 6.7.2.1, 6.7.2.2, + [^ x ^], 3.18 , (comma punctuator), 6.5.2, 6.7, 6.7.2.1, 6.7.2.2, 6.7.2.3, 6.7.8 - ??? x ???, 3.19 - (subtraction operator), 6.5.6, F.3, G.5.2 + [_ x _], 3.19 - (subtraction operator), 6.5.6, F.3, G.5.2 ! (logical negation operator), 6.5.3.3 - (unary minus operator), 6.5.3.3, F.3 != (inequality operator), 6.5.9 -- (postfix decrement operator), 6.3.2.1, 6.5.2.4 # operator, 6.10.3.2 -- (prefix decrement operator), 6.3.2.1, 6.5.3.1