(These appendices are not a part of American National Standard for Information Systems --- Programming Language C, X3.???-1988.)
These appendices collect information that appears in the Standard, and are not necessarily complete.
The notation is described in the introduction to $3 (Language).
keyword
identifier
constant
string-literal
operator
punctuator
header-name
identifier
pp-number
character-constant
string-literal
operator
punctuator
each non-white-space character that cannot be one of the above
auto double int struct
break else long switch
case enum register typedef
char extern return union
const float short unsigned
continue for signed void
default goto sizeof volatile
do if static while
nondigit
identifier nondigit
identifier digit
_ a b c d e f g h i j k l m
n o p q r s t u v w x y z
A B C D E F G H I J K L M
N O P Q R S T U V W X Y Z
0 1 2 3 4 5 6 7 8 9
floating-constant
integer-constant
enumeration-constant
character-constant
fractional-constant exponent-part<opt> floating-suffix<opt>
digit-sequence exponent-part floating-suffix<opt>
digit-sequence<opt> . digit-sequence
digit-sequence .
e sign<opt> digit-sequence
E sign<opt> digit-sequence
+ -
digit
digit-sequence digit
f l F L
decimal-constant integer-suffix<opt>
octal-constant integer-suffix<opt>
hexadecimal-constant integer-suffix<opt>
nonzero-digit
decimal-constant digit
0
octal-constant octal-digit
0x hexadecimal-digit
0X hexadecimal-digit
hexadecimal-constant hexadecimal-digit
1 2 3 4 5 6 7 8 9
0 1 2 3 4 5 6 7
0 1 2 3 4 5 6 7 8 9
a b c d e f
A B C D E F
unsigned-suffix long-suffix<opt>
long-suffix unsigned-suffix<opt>
u U
l L
identifier
' c-char-sequence'
L' c-char-sequence'
c-char
c-char-sequence c-char
any member of the source character set except
the single-quote ', backslash \, or new-line character
escape-sequence
simple-escape-sequence
octal-escape-sequence
hexadecimal-escape-sequence
\' \" \? \\
\a \b \f \n \r \t \v
\ octal-digit
\ octal-digit octal-digit
\ octal-digit octal-digit octal-digit
\x hexadecimal-digit
hexadecimal-escape-sequence hexadecimal-digit
" s-char-sequence<opt>"
L" s-char-sequence<opt>"
s-char
s-char-sequence s-char
any member of the source character set except
the double-quote ", backslash \, or new-line character
escape-sequence
[ ] ( ) . ->
++ -- & * + - ~ ! sizeof
/ % << >> < > <= >= =^= != ^ | && ||
? :
= *= /= %= += -= <<= >>= &= ^= |=
, # ##
[ ] ( ) { } * , : = ; ... #
< h-char-sequence>
" q-char-sequence"
h-char
h-char-sequence h-char
any member of the source character set except
the new-line character and >
q-char
q-char-sequence q-char
any member of the source character set except
the new-line character and "
digit
. digit
pp-number digit
pp-number nondigit
pp-number e sign
pp-number E sign
pp-number .
identifier
constant
string-literal
( expression )
primary-expression
postfix-expression [ expression ]
postfix-expression ( argument-expression-list<opt> )
postfix-expression . identifier
postfix-expression -> identifier
postfix-expression ++
postfix-expression --
assignment-expression
argument-expression-list , assignment-expression
postfix-expression
++ unary-expression
-- unary-expression
unary-operator cast-expression
sizeof unary-expression
sizeof ( type-name )
& * + - ~ !
unary-expression
( type-name ) cast-expression
cast-expression
multiplicative-expression * cast-expression
multiplicative-expression / cast-expression
multiplicative-expression % cast-expression
multiplicative-expression
additive-expression + multiplicative-expression
additive-expression - multiplicative-expression
additive-expression
shift-expression << additive-expression
shift-expression >> additive-expression
shift-expression
relational-expression < shift-expression
relational-expression > shift-expression
relational-expression <= shift-expression
relational-expression >= shift-expression
relational-expression
equality-expression =^= relational-expression
equality-expression != relational-expression
equality-expression
AND-expression & equality-expression
AND-expression
exclusive-OR-expression ^ AND-expression
exclusive-OR-expression
inclusive-OR-expression | exclusive-OR-expression
inclusive-OR-expression
logical-AND-expression && inclusive-OR-expression
logical-AND-expression
logical-OR-expression || logical-AND-expression
logical-OR-expression
logical-OR-expression ? expression : conditional-expression
conditional-expression
unary-expression assignment-operator assignment-expression
= *= /= %= += -= <<= >>= &= ^= |=
assignment-expression
expression , assignment-expression
conditional-expression
declaration-specifiers init-declarator-list<opt> ;
storage-class-specifier declaration-specifiers<opt>
type-specifier declaration-specifiers<opt>
type-qualifier declaration-specifiers<opt>
init-declarator
init-declarator-list , init-declarator
declarator
declarator = initializer
typedef
extern
static
auto
register
void
char
short
int
long
float
double
signed
unsigned
struct-or-union-specifier
enum-specifier
typedef-name
struct-or-union identifier<opt> { struct-declaration-list }
struct-or-union identifier
struct
union
struct-declaration
struct-declaration-list struct-declaration
specifier-qualifier-list struct-declarator-list ;
type-specifier specifier-qualifier-list<opt>
type-qualifier specifier-qualifier-list<opt>
struct-declarator
struct-declarator-list , struct-declarator
declarator
declarator<opt> : constant-expression
enum identifier<opt> { enumerator-list }
enum identifier
enumerator
enumerator-list , enumerator
enumeration-constant
enumeration-constant = constant-expression
const
volatile
pointer<opt> direct-declarator
identifier
( declarator )
direct-declarator [ constant-expression<opt> ]
direct-declarator ( parameter-type-list )
direct-declarator ( identifier-list<opt> )
* type-qualifier-list<opt>
* type-qualifier-list<opt> pointer
type-qualifier
type-qualifier-list type-qualifier
parameter-list
parameter-list , ...
parameter-declaration
parameter-list , parameter-declaration
declaration-specifiers declarator
declaration-specifiers abstract-declarator<opt>
identifier
identifier-list , identifier
specifier-qualifier-list abstract-declarator<opt>
pointer
pointer<opt> direct-abstract-declarator
( abstract-declarator )
direct-abstract-declarator<opt> [ constant-expression<opt> ]
direct-abstract-declarator<opt> ( parameter-type-list<opt> )
identifier
assignment-expression
{ initializer-list }
{ initializer-list , }
initializer
initializer-list , initializer
labeled-statement
compound-statement
expression-statement
selection-statement
iteration-statement
jump-statement
identifier : statement
case constant-expression : statement
default : statement
{ declaration-list<opt> statement-list<opt> }
declaration
declaration-list declaration
statement
statement-list statement
expression<opt> ;
if ( expression ) statement
if ( expression ) statement else statement
switch ( expression ) statement
while ( expression ) statement
do statement while ( expression ) ;
for ( expression<opt> ; expression<opt> ; expression<opt> ) statement
goto identifier ;
continue ;
break ;
return expression<opt> ;
external-declaration
translation-unit external-declaration
function-definition
declaration
declaration-specifiers<opt> declarator declaration-list<opt> compound-statement
group<opt>
group-part
group group-part
pp-tokens<opt> new-line
if-section
control-line
if-group elif-groups<opt> else-group<opt> endif-line
# if constant-expression new-line group<opt>
# ifdef identifier new-line group<opt>
# ifndef identifier new-line group<opt>
elif-group
elif-groups elif-group
# elif constant-expression new-line group<opt>
# else new-line group<opt>
# endif new-line
control-line:
the left-parenthesis character without preceding white space
pp-tokens<opt>
preprocessing-token
pp-tokens preprocessing-token
the new-line character
The following are the sequence points described in $2.1.2.3.
* The call to a function, after the arguments have been evaluated ($3.3.2.2).
* The end of the first operand of the following operators: logical AND && ($3.3.13); logical OR || ($3.3.14); conditional ? ($3.3.15); comma , ($3.3.17).
* The end of a full expression: an initializer ($3.5.7); the expression in an expression statement ($3.6.3); the controlling expression of a selection statement ( if or switch ) ($3.6.4); the controlling expression of a while or do statement ($3.6.5); the three expressions of a for statement ($3.6.5.3); the expression in a return statement ($3.6.6.4).
EDOM
ERANGE
errno
NULL
offsetof( type, member-designator)
ptrdiff_t
size_t
wchar_t
NDEBUG
void assert(int expression);
int isalnum(int c);
int isalpha(int c);
int iscntrl(int c);
int isdigit(int c);
int isgraph(int c);
int islower(int c);
int isprint(int c);
int ispunct(int c);
int isspace(int c);
int isupper(int c);
int isxdigit(int c);
int tolower(int c);
int toupper(int c);
LC_ALL
LC_COLLATE
LC_CTYPE
LC_MONETARY
LC_NUMERIC
LC_TIME
NULL
struct lconv
char *setlocale(int category, const char *locale);
struct lconv *localeconv(void);
HUGE_VAL
double acos(double x);
double asin(double x);
double atan(double x);
double atan2(double y, double x);
double cos(double x);
double sin(double x);
double tan(double x);
double cosh(double x);
double sinh(double x);
double tanh(double x);
double exp(double x);
double frexp(double value, int *exp);
double ldexp(double x, int exp);
double log(double x);
double log10(double x);
double modf(double value, double *iptr);
double pow(double x, double y);
double sqrt(double x);
double ceil(double x);
double fabs(double x);
double floor(double x);
double fmod(double x, double y);
jmp_buf
int setjmp(jmp_buf env);
void longjmp(jmp_buf env, int val);
sig_atomic_t
SIG_DFL
SIG_ERR
SIG_IGN
SIGABRT
SIGFPE
SIGILL
SIGINT
SIGSEGV
SIGTERM
void (*signal(int sig, void (*func)(int)))(int);
int raise(int sig);
va_list
void va_start(va_list ap, parmN);
type va_arg(va_list ap, type);
void va_end(va_list ap);
_IOFBF
_IOLBF
_IONBF
BUFSIZ
EOF
FILE
FILENAME_MAX
FOPEN_MAX
fpos_t
L_tmpnam
NULL
SEEK_CUR
SEEK_END
SEEK_SET
size_t
stderr
stdin
stdout
TMP_MAX
int remove(const char *filename);
int rename(const char *old, const char *new);
FILE *tmpfile(void);
char *tmpnam(char *s);
int fclose(FILE *stream);
int fflush(FILE *stream);
FILE *fopen(const char *filename, const char *mode);
FILE *freopen(const char *filename, const char *mode,
FILE *stream);
void setbuf(FILE *stream, char *buf);
int setvbuf(FILE *stream, char *buf, int mode, size_t size);
int fprintf(FILE *stream, const char *format, ...);
int fscanf(FILE *stream, const char *format, ...);
int printf(const char *format, ...);
int scanf(const char *format, ...);
int sprintf(char *s, const char *format, ...);
int sscanf(const char *s, const char *format, ...);
int vfprintf(FILE *stream, const char *format, va_list arg);
int vprintf(const char *format, va_list arg);
int vsprintf(char *s, const char *format, va_list arg);
int fgetc(FILE *stream);
char *fgets(char *s, int n, FILE *stream);
int fputc(int c, FILE *stream);
int fputs(const char *s, FILE *stream);
int getc(FILE *stream);
int getchar(void);
char *gets(char *s);
int putc(int c, FILE *stream);
int putchar(int c);
int puts(const char *s);
int ungetc(int c, FILE *stream);
size_t fread(void *ptr, size_t size, size_t nmemb,
FILE *stream);
size_t fwrite(const void *ptr, size_t size, size_t nmemb,
FILE *stream);
int fgetpos(FILE *stream, fpos_t *pos);
int fseek(FILE *stream, long int offset, int whence);
int fsetpos(FILE *stream, const fpos_t *pos);
long int ftell(FILE *stream);
void rewind(FILE *stream);
void clearerr(FILE *stream);
int feof(FILE *stream);
int ferror(FILE *stream);
void perror(const char *s);
EXIT_FAILURE
EXIT_SUCCESS
MB_CUR_MAX
NULL
RAND_MAX
div_t
ldiv_t
size_t
wchar_t
double atof(const char *nptr);
int atoi(const char *nptr);
long int atol(const char *nptr);
double strtod(const char *nptr, char **endptr);
long int strtol(const char *nptr, char **endptr, int base);
unsigned long int strtoul(const char *nptr, char **endptr,
int base);
int rand(void);
void srand(unsigned int seed);
void *calloc(size_t nmemb, size_t size);
void free(void *ptr);
void *malloc(size_t size);
void *realloc(void *ptr, size_t size);
void abort(void);
int atexit(void (*func)(void));
void exit(int status);
char *getenv(const char *name);
int system(const char *string);
void *bsearch(const void *key, const void *base,
size_t nmemb, size_t size,
int (*compar)(const void *, const void *));
void qsort(void *base, size_t nmemb, size_t size,
int (*compar)(const void *, const void *));
int abs(int j);
div_t div(int numer, int denom);
long int labs(long int j);
ldiv_t ldiv(long int numer, long int denom);
int mblen(const char *s, size_t n);
int mbtowc(wchar_t *pwc, const char *s, size_t n);
int wctomb(char *s, wchar_t wchar);
size_t mbstowcs(wchar_t *pwcs, const char *s, size_t n);
size_t wcstombs(char *s, const wchar_t *pwcs, size_t n);
NULL
size_t
void *memcpy(void *s1, const void *s2, size_t n);
void *memmove(void *s1, const void *s2, size_t n);
char *strcpy(char *s1, const char *s2);
char *strncpy(char *s1, const char *s2, size_t n);
char *strcat(char *s1, const char *s2);
char *strncat(char *s1, const char *s2, size_t n);
int memcmp(const void *s1, const void *s2, size_t n);
int strcmp(const char *s1, const char *s2);
int strcoll(const char *s1, const char *s2);
int strncmp(const char *s1, const char *s2, size_t n);
size_t strxfrm(char *s1, const char *s2, size_t n);
void *memchr(const void *s, int c, size_t n);
char *strchr(const char *s, int c);
size_t strcspn(const char *s1, const char *s2);
char *strpbrk(const char *s1, const char *s2);
char *strrchr(const char *s, int c);
size_t strspn(const char *s1, const char *s2);
char *strstr(const char *s1, const char *s2);
char *strtok(char *s1, const char *s2);
void *memset(void *s, int c, size_t n);
char *strerror(int errnum);
size_t strlen(const char *s);
CLK_TCK
NULL
clock_t
time_t
size_t
struct tm
clock_t clock(void);
double difftime(time_t time1, time_t time0);
time_t mktime(struct tm *timeptr);
time_t time(time_t *timer);
char *asctime(const struct tm *timeptr);
char *ctime(const time_t *timer);
struct tm *gmtime(const time_t *timer);
struct tm *localtime(const time_t *timer);
size_t strftime(char *s, size_t maxsize,
const char *format, const struct tm *timeptr);
The contents of a header <limits.h> are given below, in alphabetic order. The minimum magnitudes shown shall be replaced by implementation-defined magnitudes with the same sign. The values shall all be constant expressions suitable for use in #if preprocessing directives. The components are described further in $2.2.4.2.
#define CHAR_BIT 8
#define CHAR_MAX UCHAR_MAX or SCHAR_MAX
#define CHAR_MIN 0 or SCHAR_MIN
#define MB_LEN_MAX 1
#define INT_MAX +32767
#define INT_MIN -32767
#define LONG_MAX +2147483647
#define LONG_MIN -2147483647
#define SCHAR_MAX +127
#define SCHAR_MIN -127
#define SHRT_MAX +32767
#define SHRT_MIN -32767
#define UCHAR_MAX 255
#define UINT_MAX 65535
#define ULONG_MAX 4294967295
#define USHRT_MAX 65535
The contents of a header <float.h> are given below, in alphabetic order. The value of FLT_RADIX shall be a constant expression suitable for use in #if preprocessing directives. Values that need not be constant expressions shall be supplied for all other components. The minimum magnitudes shown for integers and exponents shall be replaced by implementation-defined magnitudes with the same sign. The components are described further in $2.2.4.2.
#define DBL_DIG 10
#define DBL_EPSILON 1E-9
#define DBL_MANT_DIG
#define DBL_MAX 1E+37
#define DBL_MAX_10_EXP +37
#define DBL_MAX_EXP
#define DBL_MIN 1E-37
#define DBL_MIN_10_EXP -37
#define DBL_MIN_EXP
#define FLT_DIG 6
#define FLT_EPSILON 1E-5
#define FLT_MANT_DIG
#define FLT_MAX 1E+37
#define FLT_MAX_10_EXP +37
#define FLT_MAX_EXP
#define FLT_MIN 1E-37
#define FLT_MIN_10_EXP -37
#define FLT_MIN_EXP
#define FLT_RADIX 2
#define FLT_ROUNDS
#define LDBL_DIG 10
#define LDBL_EPSILON 1E-9
#define LDBL_MANT_DIG
#define LDBL_MAX 1E+37
#define LDBL_MAX_10_EXP +37
#define LDBL_MAX_EXP
#define LDBL_MIN 1E-37
#define LDBL_MIN_10_EXP -37
#define LDBL_MIN_EXP
An implementation may generate warnings in many situations, none of which is specified as part of the Standard. The following are a few of the more common situations.
* A block with initialization of an object that has automatic storage duration is jumped into ($3.1.2.4).
* An integer character constant includes more than one character or a wide character constant includes more than one multibyte character ($3.1.3.4).
* The characters /* are found in a comment ($3.1.7).
* An implicit narrowing conversion is encountered, such as the assignment of a long int or a double to an int , or a pointer to void to a pointer to any type of object other than char ($3.2).
* An ``unordered'' binary operator (not comma, && or || ) contains a side-effect to an lvalue in one operand, and a side-effect to, or an access to the value of, the identical lvalue in the other operand ($3.3).
* A function is called but no prototype has been supplied ($3.3.2.2).
* The arguments in a function call do not agree in number and type with those of the parameters in a function definition that is not a prototype ($3.3.2.2).
* An object is defined but not used ($3.5).
* A value is given to an object of an enumeration type other than by assignment of an enumeration constant that is a member of that type, or an enumeration variable that has the same type, or the value of a function that returns the same enumeration type ($3.5.2.2).
* An aggregate has a partly bracketed initialization ($3.5.7).
* A statement cannot be reached ($3.6).
* A statement with no apparent effect is encountered ($3.6).
* A constant expression is used as the controlling expression of a selection statement ($3.6.4).
* A function has return statements with and without expressions ($3.6.6.4).
* An incorrectly formed preprocessing group is encountered while skipping a preprocessing group ($3.8.1).
* An unrecognized #pragma directive is encountered ($3.8.6).
This appendix collects some information about portability that appears in the Standard.
The following are unspecified:
* The manner and timing of static initialization ($2.1.2).
* The behavior if a printable character is written when the active position is at the final position of a line ($2.2.2).
* The behavior if a backspace character is written when the active position is at the initial position of a line ($2.2.2).
* The behavior if a horizontal tab character is written when the active position is at or past the last defined horizontal tabulation position ($2.2.2).
* The behavior if a vertical tab character is written when the active position is at or past the last defined vertical tabulation position ($2.2.2).
* The representations of floating types ($3.1.2.5).
* The order in which expressions are evaluated --- in any order conforming to the precedence rules, even in the presence of parentheses ($3.3).
* The order in which side effects take place ($3.3).
* The order in which the function designator and the arguments in a function call are evaluated ($3.3.2.2).
* The alignment of the addressable storage unit allocated to hold a bit-field ($3.5.2.1).
* The layout of storage for parameters ($3.7.1).
* The order in which # and ## operations are evaluated during macro substitution ($3.8.3.3).
* Whether errno is a macro or an external identifier ($4.1.3).
* Whether setjmp is a macro or an external identifier ($4.6.1.1).
* Whether va_end is a macro or an external identifier ($4.8.1.3).
* The value of the file position indicator after a successful call to the ungetc function for a text stream, until all pushed-back characters are read or discarded ($4.9.7.11).
* The details of the value stored by the fgetpos function on success ($4.9.9.1).
* The details of the value returned by the ftell function for a text stream on success ($4.9.9.4).
* The order and contiguity of storage allocated by the calloc , malloc , and realloc functions ($4.10.3).
* Which of two members that compare as equal is returned by the bsearch function ($4.10.5.1).
* The order in an array sorted by the qsort function of two members that compare as equal ($4.10.5.2).
* The encoding of the calendar time returned by the time function ($4.12.2.3).
The behavior in the following circumstances is undefined:
* A nonempty source file does not end in a new-line character, ends in new-line character immediately preceded by a backslash character, or ends in a partial preprocessing token or comment ($2.1.1.2).
* A character not in the required character set is encountered in a source file, except in a preprocessing token that is never converted to a token, a character constant, a string literal, or a comment ($2.2.1).
* A comment, string literal, character constant, or header name contains an invalid multibyte character or does not begin and end in the initial shift state ($2.2.1.2).
* An unmatched ' or character is encountered on a logical source line during tokenization ($3.1).
* The same identifier is used more than once as a label in the same function ($3.1.2.1).
* An identifier is used that is not visible in the current scope ($3.1.2.1).
* Identifiers that are intended to denote the same entity differ in a character beyond the minimal significant characters ($3.1.2).
* The same identifier has both internal and external linkage in the same translation unit ($3.1.2.2).
* An identifier with external linkage is used but there does not exist exactly one external definition in the program for the identifier ($3.1.2.2).
* The value stored in a pointer that referred to an object with automatic storage duration is used ($3.1.2.4).
* Two declarations of the same object or function specify types that are not compatible ($3.1.2.6).
* An unspecified escape sequence is encountered in a character constant or a string literal ($3.1.3.4).
* An attempt is made to modify a string literal of either form ($3.1.4).
* A character string literal token is adjacent to a wide string literal token ($3.1.4).
* The characters ', \ , , or /* are encountered between the < and > delimiters or the characters ', \ , or /* are encountered between the delimiters in the two forms of a header name preprocessing token ($3.1.7).
* An arithmetic conversion produces a result that cannot be represented in the space provided ($3.2.1).
* An lvalue with an incomplete type is used in a context that requires the value of the designated object ($3.2.2.1).
* The value of a void expression is used or an implicit conversion (except to void ) is applied to a void expression ($3.2.2.2).
* An object is modified more than once, or is modified and accessed other than to determine the new value, between two sequence points ($3.3).
* An arithmetic operation is invalid (such as division or modulus by 0) or produces a result that cannot be represented in the space provided (such as overflow or underflow) ($3.3).
* An object has its stored value accessed by an lvalue that does not have one of the following types: the declared type of the object, a qualified version of the declared type of the object, the signed or unsigned type corresponding to the declared type of the object, the signed or unsigned type corresponding to a qualified version of the declared type of the object, an aggregate or union type that (recursively) includes one of the aforementioned types among its members, or a character type ($3.3).
* An argument to a function is a void expression ($3.3.2.2).
* For a function call without a function prototype, the number of arguments does not agree with the number of parameters ($3.3.2.2).
* For a function call without a function prototype, if the function is defined without a function prototype, and the types of the arguments after promotion do not agree with those of the parameters after promotion ($3.3.2.2).
* If a function is called with a function prototype and the function is not defined with a compatible type ($3.3.2.2).
* A function that accepts a variable number of arguments is called without a function prototype that ends with an ellipsis ($3.3.2.2).
* An invalid array reference, null pointer reference, or reference to an object declared with automatic storage duration in a terminated block occurs ($3.3.3.2).
* A pointer to a function is converted to point to a function of a different type and used to call a function of a type not compatible with the original type ($3.3.4).
* A pointer to a function is converted to a pointer to an object or a pointer to an object is converted to a pointer to a function ($3.3.4).
* A pointer is converted to other than an integral or pointer type ($3.3.4).
* A pointer that is not to a member of an array object is added to or subtracted from ($3.3.6).
* Pointers that are not to the same array object are subtracted ($3.3.6).
* An expression is shifted by a negative number or by an amount greater than or equal to the width in bits of the expression being shifted ($3.3.7).
* Pointers are compared using a relational operator that do not point to the same aggregate or union ($3.3.8).
* An object is assigned to an overlapping object ($3.3.16.1).
* An identifier for an object is declared with no linkage and the type of the object is incomplete after its declarator, or after its init-declarator if it has an initializer ($3.5).
* A function is declared at block scope with a storage-class specifier other than extern ($3.5.1).
* A bit-field is declared with a type other than int , signed int , or unsigned int ($3.5.2.1).
* An attempt is made to modify an object with const-qualified type by means of an lvalue with non-const-qualified type ($3.5.3).
* An attempt is made to refer to an object with volatile-qualified type by means of an lvalue with non-volatile-qualified type ($3.5.3).
* The value of an uninitialized object that has automatic storage duration is used before a value is assigned ($3.5.7).
* An object with aggregate or union type with static storage duration has a non-brace-enclosed initializer, or an object with aggregate or union type with automatic storage duration has either a single expression initializer with a type other than that of the object or a non-brace-enclosed initializer ($3.5.7).
* The value of a function is used, but no value was returned ($3.6.6.4).
* A function that accepts a variable number of arguments is defined without a parameter type list that ends with the ellipsis notation ($3.7.1).
* An identifier for an object with internal linkage and an incomplete type is declared with a tentative definition ($3.7.2).
* The token defined is generated during the expansion of a #if or #elif preprocessing directive ($3.8.1).
* The #include preprocessing directive that results after expansion does not match one of the two header name forms ($3.8.2).
* A macro argument consists of no preprocessing tokens ($3.8.3).
* There are sequences of preprocessing tokens within the list of macro arguments that would otherwise act as preprocessing directive lines ($3.8.3).
* The result of the preprocessing concatenation operator ## is not a valid preprocessing token ($3.8.3).
* The #line preprocessing directive that results after expansion does not match one of the two well-defined forms ($3.8.4).
* One of the following identifiers is the subject of a #define or #undef preprocessing directive: defined , __LINE__ , __FILE__ , __DATE__ , __TIME__ , or __STDC__ ($3.8.8).
* An attempt is made to copy an object to an overlapping object by use of a library function other than memmove ($4.).
* The effect if the program redefines a reserved external identifier ($4.1.2).
* The effect if a standard header is included within an external definition; is included for the first time after the first reference to any of the functions or objects it declares, or to any of the types or macros it defines; or is included while a macro is defined with a name the same as a keyword ($4.1.2).
* A macro definition of errno is suppressed to obtain access to an actual object ($4.1.3).
* The parameter member-designator of an offsetof macro is an invalid right operand of the . operator for the type parameter or designates bit-field member of a structure ($4.1.5).
* A library function argument has an invalid value, unless the behavior is specified explicitly ($4.1.6).
* A library function that accepts a variable number of arguments is not declared ($4.1.6).
* The macro definition of assert is suppressed to obtain access to an actual function ($4.2).
* The argument to a character handling function is out of the domain ($4.3).
* A macro definition of setjmp is suppressed to obtain access to an actual function ($4.6).
* An invocation of the setjmp macro occurs in a context other than as the controlling expression in a selection or iteration statement, or in a comparison with an integral constant expression (possibly as implied by the unary ! operator) as the controlling expression of a selection or iteration statement, or as an expression statement (possibly cast to void ) ($4.6.1.1).
* An object of automatic storage class that does not have volatile-qualified type has been changed between a setjmp invocation and a longjmp call and then has its value accessed ($4.6.2.1).
* The longjmp function is invoked from a nested signal routine ($4.6.2.1).
* A signal occurs other than as the result of calling the abort or raise function, and the signal handler calls any function in the standard library other than the signal function itself or refers to any object with static storage duration other than by assigning a value to a static storage duration variable of type volatile sig_atomic_t ($4.7.1.1).
* The value of errno is referred to after a signal occurs other than as the result of calling the abort or raise function and the corresponding signal handler calls the signal function such that it returns the value SIG_ERR ($4.7.1.1).
* The macro va_arg is invoked with the parameter ap that was passed to a function that invoked the macro va_arg with the same parameter ($4.8).
* A macro definition of va_start , va_arg , or va_end or a combination thereof is suppressed to obtain access to an actual function ($4.8.1).
* The parameter parmN of a va_start macro is declared with the register storage class, or with a function or array type, or with a type that is not compatible with the type that results after application of the default argument promotions ($4.8.1.1).
* There is no actual next argument for a va_arg macro invocation ($4.8.1.2).
* The type of the actual next argument in a variable argument list disagrees with the type specified by the va_arg macro ($4.8.1.2).
* The va_end macro is invoked without a corresponding invocation of the va_start macro ($4.8.1.3).
* A return occurs from a function with a variable argument list initialized by the va_start macro before the va_end macro is invoked ($4.8.1.3).
* The stream for the fflush function points to an input stream or to an update stream in which the most recent operation was input ($4.9.5.2).
* An output operation on an update stream is followed by an input operation without an intervening call to the fflush function or a file positioning function, or an input operation on an update stream is followed by an output operation without an intervening call to a file positioning function ($4.9.5.3).
* The format for the fprintf or fscanf function does not match the argument list ($4.9.6).
* An invalid conversion specification is found in the format for the fprintf or fscanf function ($4.9.6).
* A %% conversion specification for the fprintf or fscanf function contains characters between the pair of % characters ($4.9.6).
* A conversion specification for the fprintf function contains an h or l with a conversion specifier other than d , i , n , o , u , x , or X , or an L with a conversion specifier other than e , E , f , g , or G ($4.9.6.1).
* A conversion specification for the fprintf function contains a # flag with a conversion specifier other than o , x , X , e , E , f , g , or G ($4.9.6.1).
* A conversion specification for the fprintf function contains a 0 flag with a conversion specifier other than d , i , o , u , x , X , e , E , f , g , or G ($4.9.6.1).
* An aggregate or union, or a pointer to an aggregate or union is an argument to the fprintf function, except for the conversion specifiers %s (for an array of character type) or %p (for a pointer to void ) ($4.9.6.1).
* A single conversion by the fprintf function produces more than 509 characters of output ($4.9.6.1).
* A conversion specification for the fscanf function contains an h or l with a conversion specifier other than d , i , n , o , u , or x , or an L with a conversion specifier other than e , f , or g ($4.9.6.2).
* A pointer value printed by %p conversion by the fprintf function during a previous program execution is the argument for %p conversion by the fscanf function ($4.9.6.2).
* The result of a conversion by the fscanf function cannot be represented in the space provided, or the receiving object does not have an appropriate type ($4.9.6.2).
* The result of converting a string to a number by the atof , atoi , or atol function cannot be represented ($4.10.1).
* The value of a pointer that refers to space deallocated by a call to the free or realloc function is referred to ($4.10.3).
* The pointer argument to the free or realloc function does not match a pointer earlier returned by calloc , malloc , or realloc , or the object pointed to has been deallocated by a call to free or realloc ($4.10.3).
* A program executes more than one call to the exit function ($4.10.4.3).
* The result of an integer arithmetic function ( abs , div , labs , or ldiv ) cannot be represented ($4.10.6).
* The shift states for the mblen , mbtowc , and wctomb functions are not explicitly reset to the initial state when the LC_CTYPE category of the current locale is changed ($4.10.7).
* An array written to by a copying or concatenation function is too small ($4.11.2, $4.11.3).
* An invalid conversion specification is found in the format for the strftime function ($4.12.3.5).
Each implementation shall document its behavior in each of the areas listed in this section. The following are implementation-defined:
* The semantics of the arguments to main ($2.1.2.2).
* What constitutes an interactive device ($2.1.2.3).
* The number of significant initial characters (beyond 31) in an identifier without external linkage ($3.1.2).
* The number of significant initial characters (beyond 6) in an identifier with external linkage ($3.1.2).
* Whether case distinctions are significant in an identifier with external linkage ($3.1.2).
* The members of the source and execution character sets, except as explicitly specified in the Standard ($2.2.1).
* The shift states used for the encoding of multibyte characters $2.2.1.2).
* The number of bits in a character in the execution character set ($2.2.4.2).
* The mapping of members of the source character set (in character constants and string literals) to members of the execution character set ($3.1.3.4).
* The value of an integer character constant that contains a character or escape sequence not represented in the basic execution character set or the extended character set for a wide character constant ($3.1.3.4).
* The value of an integer character constant that contains more than one character or a wide character constant that contains more than one multibyte character ($3.1.3.4).
* The current locale used to convert multibyte characters into corresponding wide characters (codes) for a wide character constant ($3.1.3.4).
* Whether a ``plain'' char has the same range of values as signed char or unsigned char ($3.2.1.1).
* The representations and sets of values of the various types of integers ($3.1.2.5).
* The result of converting an integer to a shorter signed integer, or the result of converting an unsigned integer to a signed integer of equal length, if the value cannot be represented ($3.2.1.2).
* The results of bitwise operations on signed integers ($3.3).
* The sign of the remainder on integer division ($3.3.5).
* The result of a right shift of a negative-valued signed integral type ($3.3.7).
* The representations and sets of values of the various types of floating-point numbers ($3.1.2.5).
* The direction of truncation when an integral number is converted to a floating-point number that cannot exactly represent the original value ($3.2.1.3).
* The direction of truncation or rounding when a floating-point number is converted to a narrower floating-point number ($3.2.1.4).
* The type of integer required to hold the maximum size of an array --- that is, the type of the sizeof operator, size_t ($3.3.3.4, $4.1.1).
* The result of casting a pointer to an integer or vice versa ($3.3.4).
* The type of integer required to hold the difference between two pointers to members of the same array, ptrdiff_t ($3.3.6, $4.1.1).
* The extent to which objects can actually be placed in registers by use of the register storage-class specifier ($3.5.1).
* A member of a union object is accessed using a member of a different type ($3.3.2.3).
* The padding and alignment of members of structures ($3.5.2.1). This should present no problem unless binary data written by one implementation are read by another.
* Whether a ``plain'' int bit-field is treated as a signed int bit-field or as an unsigned int bit-field ($3.5.2.1).
* The order of allocation of bit-fields within an int ($3.5.2.1).
* Whether a bit-field can straddle a storage-unit boundary ($3.5.2.1).
* The integer type chosen to represent the values of an enumeration type ($3.5.2.2).
* What constitutes an access to an object that has volatile-qualified type ($3.5.5.3).
* The maximum number of declarators that may modify an arithmetic, structure, or union type ($3.5.4).
* The maximum number of case values in a switch statement ($3.6.4.2).
* Whether the value of a single-character character constant in a constant expression that controls conditional inclusion matches the value of the same character constant in the execution character set. Whether such a character constant may have a negative value ($3.8.1).
* The method for locating includable source files ($3.8.2).
* The support of quoted names for includable source files ($3.8.2).
* The mapping of source file character sequences ($3.8.2).
* The behavior on each recognized #pragma directive ($3.8.6).
* The definitions for __DATE__ and __TIME__ when respectively, the date and time of translation are not available ($3.8.8).
* The null pointer constant to which the macro NULL expands ($4.1.5).
* The diagnostic printed by and the termination behavior of the assert function ($4.2).
* The sets of characters tested for by the isalnum , isalpha , iscntrl , islower , isprint , and isupper functions ($4.3.1).
* The values returned by the mathematics functions on domain errors ($4.5.1).
* Whether the mathematics functions set the integer expression errno to the value of the macro ERANGE on underflow range errors ($4.5.1).
* Whether a domain error occurs or zero is returned when the fmod function has a second argument of zero ($4.5.6.4).
* The set of signals for the signal function ($4.7.1.1).
* The semantics for each signal recognized by the signal function ($4.7.1.1).
* The default handling and the handling at program startup for each signal recognized by the signal function ($4.7.1.1).
* If the equivalent of signal(sig, SIG_DFL); is not executed prior to the call of a signal handler, the blocking of the signal that is performed ($4.7.1.1).
* Whether the default handling is reset if the SIGILL signal is received by a handler specified to the signal function ($4.7.1.1).
* Whether the last line of a text stream requires a terminating new-line character ($4.9.2).
* Whether space characters that are written out to a text stream immediately before a new-line character appear when read in ($4.9.2).
* The number of null characters that may be appended to data written to a binary stream ($4.9.2).
* Whether the file position indicator of an append mode stream is initially positioned at the beginning or end of the file ($4.9.3).
* Whether a write on a text stream causes the associated file to be truncated beyond that point ($4.9.3).
* The characteristics of file buffering ($4.9.3).
* Whether a zero-length file actually exists ($4.9.3).
* The rules for composing valid file names ($4.9.3).
* Whether the same file can be open multiple times ($4.9.3).
* The effect of the remove function on an open file ($4.9.4.1).
* The effect if a file with the new name exists prior to a call to the rename function ($4.9.4.2).
* The output for %p conversion in the fprintf function ($4.9.6.1).
* The input for %p conversion in the fscanf function ($4.9.6.2).
* The interpretation of a - character that is neither the first nor the last character in the scanlist for %[ conversion in the fscanf function ($4.9.6.2).
* The value to which the macro errno is set by the fgetpos or ftell function on failure ($4.9.9.1, $4.9.9.4).
* The messages generated by the perror function ($4.9.10.4).
* The behavior of the calloc , malloc , or realloc function if the size requested is zero ($4.10.3).
* The behavior of the abort function with regard to open and temporary files ($4.10.4.1).
* The status returned by the exit function if the value of the argument is other than zero, EXIT_SUCCESS , or EXIT_FAILURE ($4.10.4.3).
* The set of environment names and the method for altering the environment list used by the getenv function ($4.10.4.4).
* The contents and mode of execution of the string by the system function ($4.10.4.5).
* The contents of the error message strings returned by the strerror function ($4.11.6.2).
* The local time zone and Daylight Saving Time ($4.12.1).
* The era for the clock function ($4.12.2.1).
The following characteristics of a hosted environment are locale-specific:
* The content of the execution character set, in addition to the required members ($2.2.1).
* The direction of printing ($2.2.2).
* The decimal-point character ($4.1.1).
* The implementation-defined aspects of character testing and case mapping functions ($4.3).
* The collation sequence of the execution character set ($4.11.4.4).
* The formats for time and date ($4.12.3.5).
The following extensions are widely used in many systems, but are not portable to all implementations. The inclusion of any extension that may cause a strictly conforming program to become invalid renders an implementation nonconforming. Examples of such extensions are new keywords, or library functions declared in standard headers or predefined macros with names that do not begin with an underscore.
In a hosted environment, the main function receives a third argument, char *envp[] , that points to a null-terminated array of pointers to char , each of which points to a string that provides information about the environment for this execution of the process ($2.1.2.2).
Characters other than the underscore _ , letters, and digits, that are not defined in the required source character set (such as the dollar sign $ , or characters in national character sets) may appear in an identifier ($3.1.2).
All characters in identifiers (with or without external linkage) are significant and case distinctions are observed ($3.1.2).
A function identifier, or the identifier of an object the declaration of which contains the keyword extern , has file scope ($3.1.2.1).
String literals are modifiable. Identical string literals shall be distinct ($3.1.4).
Other arithmetic types, such as long long int , and their appropriate conversions are defined ($3.2.2.1).
A pointer to an object or to void may be cast to a pointer to a function, allowing data to be invoked as a function ($3.3.4). A pointer to a function may be cast to a pointer to an object or to void , allowing a function to be inspected or modified (for example, by a debugger) ($3.3.4).
Types other than int , unsigned int , or signed int can be declared as bit-fields, with appropriate maximum widths ($3.5.2.1).
The fortran type specifier may be used in a function declaration to indicate that function linkage suitable for FORTRAN is to be generated, or that different representations for external names are to be generated ($3.5.4.3).
The asm keyword may be used to insert assembly-language code directly into the translator output. The most common implementation is via a statement of the form
asm ( character-string-literal );
($3.6).
There may be more than one external definition for the identifier of an object, with or without the explicit use of the keyword extern , If the definitions disagree, or more than one is initialized, the behavior is undefined ($3.7.2).
A macro argument may consist of no preprocessing tokens ($3.8.3).
Macro names that do not begin with an underscore, describing the translation and execution environments, may be defined by the implementation before translation begins ($3.8.8).
Handlers for specific signals may be called with extra arguments in addition to the signal number ($4.7.1.1).
Additional mappings from files to streams may be supported ($4.9.2), and additional file-opening modes may be specified by characters appended to the mode argument of the fopen function ($4.9.5.3).
The file position indicator is decremented by each successful call to the ungetc function for a text stream, except if its value was zero before a call ($4.9.7.11).
Only major references are listed.
absolute-value functions, 4.5.6.2, 4.10.6.1 abstract declarator, type name, 3.5.5 abstract machine, 2.1.2.3 abstract semantics, 2.1.2.3 active position, 2.2.2 addition assignment operator, +=, 3.3.16.2 addition operator, +, 3.3.6 additive expressions, 3.3.6 address operator, &, 3.3.3.2 aggregate type, 3.1.2.5 alert escape sequence, \a, 2.2.2, 3.1.3.4 alignment, definition of, 1.6 alignment of structure members, 3.5.2.1 AND operator, bitwise, &, 3.3.10 AND operator, logical, &&, 3.3.13 argument, function, 3.3.2.2 argument, 1.6 argument promotion, default, 3.3.2.2 arithmetic conversions, usual, 3.2.1.5 arithmetic operators, unary, 3.3.3.3 arithmetic type, 3.1.2.5 array declarator, 3.5.4.2 array parameter, 3.7.1 array subscript operator, [ ], 3.3.2.1 array type, 3.1.2.5 array type conversion, 3.2.2.1 arrow operator, ->, 3.3.2.3 ASCII character set, 2.2.1.1 assignment operators, 3.3.16 asterisk punctuator, *, 3.1.6, 3.5.4.1 automatic storage, reentrancy, 2.1.2.3, 2.2.3 automatic storage duration, 3.1.2.4 backslash character, \, 2.1.1.2, 2.2.1 backspace escape sequence, \b, 2.2.2, 3.1.3.4 base documents, 1.5 basic character set, 1.6, 2.2.1 basic type, 3.1.2.5 binary stream, 4.9.2 bit, definition of, 1.6 bit, high-order, 1.6 bit, low-order, 1.6 bit-field structure member, 3.5.2.1 bitwise operators, 3.3, 3.3.7, 3.3.10, 3.3.11, 3.3.12 block, 3.6.2 block identifier scope, 3.1.2.1 braces punctuator, { }, 3.1.6, 3.5.7, 3.6.2 brackets punctuator, [ ], 3.1.6, 3.3.2.1, 3.5.4.2 broken-down-time type, 4.12.1 byte, definition of, 1.6 C program, 2.1.1.1 C Standard, definition of terms, 1.6 C Standard, organization of document, 1.4 C Standard, purpose of, 1.1 C Standard, references, 1.3 C Standard, scope, restrictions and limits, 1.2 carriage-return escape sequence, \r, 2.2.2, 3.1.3.4 case mapping functions, 4.3.2 cast expressions, 3.3.4 cast operator, ( ), 3.3.4 character, 1.6 character case mapping functions, 4.3.2 character constant, 2.1.1.2, 2.2.1, 3.1.3.4 character display semantics, 2.2.2 character handling header, 4.3 character input/output functions, 4.9.7 character sets, 2.2.1 character string literal, 2.1.1.2, 3.1.4 character testing functions, 4.3.1 character type, 3.1.2.5, 3.2.2.1, 3.5.7 character type conversion, 3.2.1.1 collating sequence, character set, 2.2.1 colon punctuator, :, 3.1.6, 3.5.2.1 comma operator, ,, 3.3.17 command processor, 4.10.4.5 comment delimiters, /* */, 3.1.9 comments, 2.1.1.2, 3.1, 3.1.9 common initial sequence, 3.3.2.3 comparison functions, 4.11.4 compatible type, 3.1.2.6, 3.5.2, 3.5.3, 3.5.4 complement operator, ~, 3.3.3.3 compliance, 1.7 composite type, 3.1.2.6 compound assignment operators, 3.3.16.2 compound statement, 3.6.2 concatenation functions, 4.11.3 conceptual models, 2.1 conditional inclusion, 3.8.1 conditional operator, ? :, 3.3.15 conforming freestanding implementation, 1.7 conforming hosted implementation, 1.7 conforming implementation, 1.7 conforming program, 1.7 const-qualified type, 3.1.2.5, 3.2.2.1, 3.5.3 constant, character, 3.1.3.4 constant, enumeration, 3.1.2, 3.1.3.3 constant, floating, 3.1.3.1 constant, integer, 3.1.3.2 constant, primary expression, 3.3.1 constant expressions, 3.4 constants, 3.1.3 constraints, definition of, 1.6 content, structure/union/enumeration, 3.5.2.3 contiguity, memory allocation, 4.10.3 control characters, 2.2.1, 4.3.1, 4.3.1.3 conversion, arithmetic operands, 3.2.1 conversion, array, 3.2.2.1 conversion, characters and integers, 3.2.1.1 conversion, explicit, 3.2 conversion, floating and integral, 3.2.1.3 conversion, floating types, 3.2.1.4, 3.2.1.5 conversion, function, 3.2.2.1 conversion, function arguments, 3.3.2.2, 3.7.1 conversion, implicit, 3.2 conversion, pointer, 3.2.2.1, 3.2.2.3 conversion, signed and unsigned integers, 3.2.1.2 conversion, void type, 3.2.2.2 conversions, 3.2 conversions, usual arithmetic, 3.2.1.5 copying functions, 4.11.2 data streams, 4.9.2 date and time header, 4.12 decimal constant, 3.1.3.2 decimal digits, 2.2.1 decimal-point character, 4.1.1 declaration specifiers, 3.5 declarations, 3.5 declarators, 3.5.4 declarator type derivation, 3.1.2.5, 3.5.4 decrement operator, postfix, --, 3.3.2.4 decrement operator, prefix, --, 3.3.3.1 default argument promotions, 3.3.2.2 definition, 3.5 derived declarator types, 3.1.2.5 derived types, 3.1.2.5 device input/output, 2.1.2.3 diagnostics, 2.1.1.3 diagnostics, assert.h, 4.2 direct input/output functions, 4.9.8 display device, 2.2.2 division assignment operator, /=, 3.3.16.2 division operator, /, 3.3.5 documentation of implementation, 1.7 domain error, 4.5.1 dot operator, ., 3.3.2.3 double-precision arithmetic, 2.1.2.3 element type, 3.1.2.5 ellipsis, unspecified parameters, , ..., 3.5.4.3 end-of-file macro, EOF, 4.3, 4.9.1 end-of-file indicator, 4.9.1, 4.9.7.1 end-of-line indicator, 2.2.1 enumerated types, 3.1.2.5 enumeration constant, 3.1.2, 3.1.3.3 enumeration content, 3.5.2.3 enumeration members, 3.5.2.2 enumeration specifiers, 3.5.2.2 enumeration tag, 3.5.2.3 enumerator, 3.5.2.2 environment, 2 environment functions, 4.10.4 environment list, 4.10.4.4 environmental considerations, 2.2 environmental limits, 2.2.4 equal-sign punctuator, =, 3.1.6, 3.5, 3.5.7 equal-to operator, =^=, 3.3.9 equality expressions, 3.3.9 error, domain, 4.5.1 error, range, 4.5.1 error conditions, 4.5.1 error handling functions, 4.9.10, 4.11.6.2 error indicator, 4.9.1, 4.9.7.1, 4.9.7.3 escape sequences, 2.2.1, 2.2.2, 3.1.3.4 evaluation, 3.1.5, 3.3 exception, 3.3 exclusive OR assignment operator, ^=, 3.3.16.2 exclusive OR operator, ^, 3.3.11 executable program, 2.1.1.1 execution environment, character sets, 2.2.1 execution environment limits, 2.2.4.2 execution environments, 2.1.2 execution sequence, 2.1.2.3, 3.6 explicit conversion, 3.2 exponent part, floating constant, 3.1.3.1 exponential functions, 4.5.4 expression, 3.3 expression, full, 3.6 expression, primary, 3.3.1 expression, unary, 3.3.3 expression statement, 3.6.3 extended character set, 1.6, 2.2.1.2 external definitions, 3.7 external identifiers, underscore, 4.1.2 external linkage, 3.1.2.2 external name, 3.1.2 external object definitions, 3.7.2 file, closing, 4.9.3 file, creating, 4.9.3 file, opening, 4.9.3 file access functions, 4.9.5 file identifier scope, 3.1.2.1, 3.7 file name, 4.9.3 file operations, 4.9.4 file position indicator, 4.9.3 file positioning functions, 4.9.9 files, 4.9.3 floating arithmetic functions, 4.5.6 floating constants, 3.1.3.1 floating suffix, f or F, 3.1.3.1 floating types, 3.1.2.5 floating-point numbers, 3.1.2.5 form-feed character, 2.2.1, 3.1 form-feed escape sequence, \f, 2.2.2, 3.1.3.4 formatted input/output functions, 4.9.6 forward references, definition of, 1.6 freestanding execution environment, 2.1.2, 2.1.2.1 full expression, 3.6 fully buffered stream, 4.9.3 function, definition of, 1.6, 3.5.4.3 function, recursive call, 3.3.2.2 function argument, 3.3.2.2 function body, 3.7, 3.7.1 function call, 3.3.2.2 function call, library, 4.1.6 function declarator, 3.5.4.3 function definition, 3.5.4.3, 3.7.1 function designator, 3.2.2.1 function identifier scope, 3.1.2.1 function image, 2.2.3 function library, 2.1.1.1, 4.1.6 function parameter, 2.1.2.2, 3.3.2.2 function prototype, 3.1.2.1, 3.3.2.2, 3.5.4.3, 3.7.1 function prototype identifier scope, 3.1.2.1 function return, 3.6.6.4 function type, 3.1.2.5 function type conversion, 3.2.2.1 function-call operator, ( ), 3.3.2.2 future directions, 1.8, 3.9, 4.13 future language directions, 3.9 future library directions, 4.13 general utility library, 4.10 graphic characters, 2.2.1 greater-than operator, >, 3.3.8 greater-than-or-equal-to operator, >=, 3.3.8 header names, 3.1, 3.1.7, 3.8.2 headers, 4.1.2 hexadecimal constant, 3.1.3.2 hexadecimal digit, 3.1.3.2, 3.1.3.4 hexadecimal escape sequence, 3.1.3.4 high-order bit, 1.6 horizontal-tab character, 2.2.1, 3.1 horizontal-tab escape sequence, \t, 2.2.2, 3.1.3.4 hosted execution environment, 2.1.2, 2.1.2.2 hyperbolic functions, 4.5.3 identifier, 3.1.2, 3.3.1 identifier, maximum length, 3.1.2 identifier, reserved, 4.1.2 identifier linkage, 3.1.2.2 identifier list, 3.5.4 identifier name space, 3.1.2.3 identifier scope, 3.1.2.1 identifier type, 3.1.2.5 IEEE floating-point arithmetic standard, 2.2.4.2 implementation, definition of, 1.6 implementation limits, 1.6, 2.2.4 implementation-defined behavior, 1.6 implicit conversion, 3.2 implicit function declaration, 3.3.2.2 inclusive OR assignment operator, |=, 3.3.16.2 inclusive OR operator, |, 3.3.12 incomplete type, 3.1.2.5 increment operator, postfix, ++, 3.3.2.4 increment operator, prefix, ++, 3.3.3.1 indirection operator, *, 3.3.3.2 inequality operator, !=, 3.3.9 initialization, 2.1.2, 3.1.2.4, 3.2.2.1, 3.5.7, 3.6.2 initializer, string literal, 3.2.2.1, 3.5.7 initializer braces, 3.5.7 initial shift state, 2.2.1.2, 4.10.7 input/output, device, 2.1.2.3 input/output header, 4.9 integer arithmetic functions, 4.10.6 integer character constant, 3.1.3.4 integer constants, 3.1.3.2 integer suffix, 3.1.3.2 integer type, 3.1.2.5 integer type conversion, 3.2.1.1, 3.2.1.2 integral constant expression, 3.4 integral promotions, 2.1.2.3, 3.2.1.1 integral type, 3.1.2.5 integral type conversion, 3.2.1.3 interactive device, 2.1.2.3, 4.9.3, 4.9.5.3 internal linkage, 3.1.2.2 internal name, 3.1.2 interrupt handler, 2.1.2.3, 2.2.3, 4.7 ISO 4217 Currency and Funds Representation, 1.3, 4.4.2.1 ISO 646 Invariant Code Set, 1.3, 2.2.1.1 iteration statements, 3.6.5 jump statements, 3.6.6 keywords, 3.1.1 label name, 3.1.2.1, 3.1.2.3 labeled statements, 3.6.1 language, 3 language, future directions, 3.9 leading underscore in identifiers, 4.1.2 left-shift assignment operator, <<=, 3.3.16.2 left-shift operator, <<, 3.3.7 length function, 4.11.6.3 less-than operator, <, 3.3.8 less-than-or-equal-to operator, <=, 3.3.8 letter, 4.1.1 lexical elements, 2.1.1.2, 3.1 library, 2.1.1.1, 4 library, future directions, 4.13 library functions, use of, 4.1.6 library terms, 4.1.1 limits, environmental, 2.2.4 limits, numerical, 2.2.4.2 limits, translation, 2.2.4.1 line buffered stream, 4.9.3 line number, 3.8.4 lines, 2.1.1.2, 3.8, 4.9.2 linkages of identifiers, 3.1.2.2 locale, definition of, 1.6 localization, 4.4 logarithmic functions, 4.5.4 logical AND operator, &&, 3.3.13 logical negation operator, !, 3.3.3.3 logical OR operator, ||, 3.3.14 logical source lines, 2.1.1.2 long double suffix, l or L, 3.1.3.1 long integer suffix, l or L, 3.1.3.2 low-order bit, 1.6 lvalue, 3.2.2.1, 3.3.1, 3.3.2.4, 3.3.3.1, 3.3.16 macro function vs. definition, 4.1.6 macro name definition, 2.2.4.1 macro names, predefined, 3.8.8 macro, redefinition of, 3.8.3 macro replacement, 3.8.3 member-access operators, . and ->, 3.3.2.3 memory management functions, 4.10.3 minus operator, unary, -, 3.3.3.3 modifiable lvalue, 3.2.2.1 modulus function, 4.5.4.6 multibyte characters, 2.2.1.2, 3.1.3.4, 4.10.7, 4.10.8 multibyte functions, 4.10.7, 4.10.8 multiplication assignment operator, *=, 3.3.16.2 multiplication operator, *, 3.3.5 multiplicative expressions, 3.3.5 name, file, 4.9.3 name spaces of identifiers, 3.1.2.3 nearest-integer functions, 4.5.6 new-line character, 2.1.1.2, 2.2.1, 3.1, 3.8, 3.8.4 new-line escape sequence, \n, 2.2.2, 3.1.3.4 nongraphic characters, 2.2.2, 3.1.3.4 nonlocal jumps header, 4.6 not-equal-to operator, !=, 3.3.9 null character padding of binary streams, 4.9.2 null character, \0, 2.2.1, 3.1.3.4, 3.1.4 null pointer, 3.2.2.3 null pointer constant, 3.2.2.3 null preprocessing directive, 3.8.7 null statement, 3.6.3 number, floating-point, 3.1.2.5 numerical limits, 2.2.4.2 object, definition of, 1.6 object type, 3.1.2.5 obsolescence, 1.8, 3.9, 4.13 octal constant, 3.1.3.2 octal digit, 3.1.3.2, 3.1.3.4 octal escape sequence, 3.1.3.4 operand, 3.1.5, 3.3 operating system, 2.1.2.1, 4.10.4.5 operator, unary, 3.3.3 operators, 3.1.5, 3.3 OR assignment operator, exclusive, ^=, 3.3.16.2 OR assignment operator, inclusive, |=, 3.3.16.2 OR operator, exclusive, ^, 3.3.11 OR operator, inclusive, |, 3.3.12 OR operator, logical, ||, 3.3.14 order of memory allocation, 4.10.3 order of evaluation of expression, 3.3 ordinary identifier name space, 3.1.2.3 padding, null character, 4.9.2 parameter, ellipsis, , ..., 3.5.4.3 parameter, function, 3.3.2.2 parameter, main function, 2.1.2.2 parameter, 1.6 parameter type list, 3.5.4.3 parameters, program, 2.1.2.2 parentheses punctuator, ( ), 3.1.6, 3.5.4.3 parenthesized expression, 3.3.1 physical source lines, 2.1.1.2 plus operator, unary, +, 3.3.3.3 pointer, null, 3.2.2.3 pointer declarator, 3.5.4.1 pointer operator, ->, 3.3.2.3 pointer to function returning type, 3.3.2.2 pointer type, 3.1.2.5 pointer type conversion, 3.2.2.1, 3.2.2.3 portability of implementations, 1.7 position indicator, file, 4.9.3 postfix decrement operator, --, 3.3.2.4 postfix expressions, 3.3.2 postfix increment operator, ++, 3.3.2.4 power functions, 4.5.5 precedence of expression operators, 3.3 precedence of syntax rules, 2.1.1.2 predefined macro names, 3.8.8 prefix decrement operator, --, 3.3.3.1 prefix increment operator, ++, 3.3.3.1 preprocessing concatenation, 2.1.1.2, 3.8.3 preprocessing directives, 2.1.1.2, 3.8 preprocessing numbers, 3.1, 3.1.8 preprocessing tokens, 2.1.1.2, 3.1, 3.8 primary expressions, 3.3.1 printing characters, 2.2.2, 4.3.1, 4.3.1.7 program, conforming, 1.7 program, strictly conforming, 1.7 program diagnostics, 4.2.1 program execution, 2.1.2.3 program file, 2.1.1.1 program image, 2.1.1.2 program name, argv[0], 2.1.2.2 program parameters, 2.1.2.2 program startup, 2.1.2, 2.1.2.1, 2.1.2.2 program structure, 2.1.1.1 program termination, 2.1.2, 2.1.2.1, 2.1.2.2, 2.1.2.3 promotions, default argument, 3.3.2.2 promotions, integral, 2.1.2.3, 3.2.1.1 prototype, function, 3.1.2.1, 3.3.2.2, 3.5.4.3, 3.7.1 pseudo-random sequence functions, 4.10.2 punctuators, 3.1.6 qualified types, 3.1.2.5 range error, 4.5.1 recursive function call, 3.3.2.2 redefinition of macro, 3.8.3 reentrancy, 2.1.2.3, 2.2.3 referenced type, 3.1.2.5 relational expressions, 3.3.8 reliability of data, interrupted, 2.1.2.3 remainder assignment operator, %=, 3.3.16.2 remainder operator, %, 3.3.5 restore calling environment function, 4.6.2.1 reserved identifiers, 4.1.2 right-shift assignment operator, >>=, 3.3.16.2 right-shift operator, >>, 3.3.7 rvalue, 3.2.2.1 save calling environment function, 4.6.1.1 scalar type, 3.1.2.5 scope of identifiers, 3.1.2.1 search functions, 4.10.5.1, 4.11.5 selection statements, 3.6.4 semicolon punctuator, ;, 3.1.6, 3.5, 3.6.3 sequence points, 2.1.2.3, 3.3, 3.6 shift expressions, 3.3.7 shift states, 2.2.1.2, 4.10.7 side effects, 2.1.2.3, 3.3 signal handler, 2.2.3, 4.7.1.1 signals, 2.1.2.3, 2.2.3, 4.7 signed integer types, 3.1.2.5, 3.1.3.2, 3.2.1.2 simple assignment operator, =, 3.3.16.1 single-precision arithmetic, 2.1.2.3 sort function, 4.10.5.2 source character set, 2.2.1 source file inclusion, 3.8.2 source files, 2.1.1.1 source text, 2.1.1.2 space character, 2.1.1.2, 2.2.1, 3.1 standard streams, 4.9.1, 4.9.3 standard header, float.h, 1.7, 2.2.4.2, 4.1.4 standard header, limits.h, 1.7, 2.2.4.2, 4.1.4 standard header, stdarg.h, 1.7, 4.8 standard header, stddef.h, 1.7, 4.1.5 standard headers, 4.1.2 state-dependent encoding, 2.2.1.2, 4.10.7 statements, 3.6 static storage duration, 3.1.2.4 storage duration, 3.1.2.4 storage-class specifier, 3.5.1 stream, fully buffered, 4.9.3 stream, line buffered, 4.9.3 stream, standard error, stderr, 4.9.1, 4.9.3 stream, standard input, stdin, 4.9.1, 4.9.3 stream, standard output, stdout, 4.9.1, 4.9.3 stream, unbuffered, 4.9.3 streams, 4.9.2 strictly conforming program, 1.7 string, 4.1.1 string conversion functions, 4.10.1 string handling header, 4.11 string length, 4.1.1, 4.11.6.3 string literal, 2.1.1.2, 2.2.1, 3.1.4, 3.3.1, 3.5.7 structure/union arrow operator, ->, 3.3.2.3 structure/union content, 3.5.2.3 structure/union dot operator, ., 3.3.2.3 structure/union member name space, 3.1.2.3 structure/union specifiers, 3.5.2.1 structure/union tag, 3.5.2.3 structure/union type, 3.1.2.5, 3.5.2.1 subtraction assignment operator, -=, 3.3.16.2 subtraction operator, -, 3.3.6 suffix, floating constant, 3.1.3.1 suffix, integer constant, 3.1.3.2 switch body, 3.6.4.2 switch case label, 3.6.1, 3.6.4.2 switch default label, 3.6.1, 3.6.4.2 syntactic categories, 3 syntax notation, 3 syntax rules, precedence of, 2.1.1.2 tab characters, 2.2.1 tabs, white space, 3.1 tag, enumeration, 3.5.2.3 tag, structure/union, 3.5.2.3 tag name space, 3.1.2.3 tentative definitions, 3.7.2 text stream, 4.9.2 time components, 4.12.1 time conversion functions, 4.12.3 time manipulation functions, 4.12.2 tokens, 2.1.1.2, 3.1, 3.8 top type, 3.1.2.5 translation environment, 2.1.1 translation limits, 2.2.4.2 translation phases, 2.1.1.2 translation unit, 2.1.1.1, 3.7 trigonometric functions, 4.5.2 trigraph sequences, 2.1.1.2, 2.2.1.1 type, character, 3.1.2.5, 3.2.2.1, 3.5.7 type, compatible, 3.1.2.6, 3.5.2, 3.5.3, 3.5.4 type, composite, 3.1.2.6 type, const-qualified, 3.1.2.5, 3.5.3 type, function, 3.1.2.5 type, incomplete, 3.1.2.5 type, object, 3.1.2.5 type, qualified, 3.1.2.5 type, unqualified, 3.1.2.5 type, volatile-qualified, 3.1.2.5, 3.5.3 type conversions, 3.2 type definitions, 3.5.6 type names, 3.5.5 type specifiers, 3.5.2 type qualifiers, 3.5.3 types, 3.1.2.5 unary arithmetic operators, 3.3.3.3 unary expressions, 3.3.3 unary minus operator, -, 3.3.3.3 unary operators, 3.3.3 unary plus operator, +, 3.3.3.3 unbuffered stream, 4.9.3 undefined behavior, 1.6 underscore, leading, in identifiers, 4.1.2 union tag, 3.5.2.3 union type specifier, 3.1.2.5, 3.5.2, 3.5.2.1 unqualified type, 3.1.2.5 unsigned integer suffix, u or U, 3.1.3.2 unsigned integer types, 3.1.2.5, 3.1.3.2 unspecified behavior, 1.6 usual arithmetic conversions, 3.2.1.5 value part, floating constant, 3.1.3.1 variable arguments header, 4.8 vertical-tab character, 2.2.1, 3.1 vertical-tab escape sequence, \v, 2.2.2, 3.1.3.4 visibility of identifiers, 3.1.2.1 void expression, 3.2.2.2 volatile storage, 2.1.2.3 volatile-qualified type, 3.1.2.5, 3.5.3 white space, 2.1.1.2, 3.1, 3.8, 4.3.1.9 wide character, 3.1.3.4 wide character constant, 3.1.3.4 wide string literal, 2.1.1.2, 3.1.4
(This foreword is not a part of American National Standard for Information Systems --- Programming Language C, X3.???-1988.)
American National Standard Programming Language C specifies the syntax and semantics of programs written in the C programming language. It specifies the C program's interactions with the execution environment via input and output data. It also specifies restrictions and limits imposed upon conforming implementations of C language translators.
The standard was developed by the X3J11 Technical Committee on the C Programming Language under project 381-D by American National Standards Committee on Computers and Information Processing (X3). SPARC document number 83-079 describes the purpose of this project to ``provide an unambiguous and machine-independent definition of the language C.''
The need for a single clearly defined standard had arisen in the C community due to a rapidly expanding use of the C programming language and the variety of differing translator implementations that had been and were being developed. The existence of similar but incompatible implementations was a serious problem for program developers who wished to develop code that would compile and execute as expected in several different environments.
Part of this problem could be traced to the fact that implementors did not have an adequate definition of the C language upon which to base their implementations. The de facto C programming language standard, The C Programming Language by Brian W. Kernighan and Dennis M. Ritchie, is an excellent book; however, it is not precise or complete enough to specify the C language fully. In addition, the language has grown over years of use to incorporate new ideas in programming and to address some of the weaknesses of the original language.
American National Standard Programming Language C addresses the problems of both the program developer and the translator implementor by specifying the C language precisely.
The work of X3J11 began in the summer of 1983, based on the several documents that were made available to the Committee (see $1.5, Base Documents). The Committee divided the effort into three pieces: the environment, the language, and the library. A complete specification in each of these areas is necessary if truly portable programs are to be developed. Each of these areas is addressed in the Standard. The Committee evaluated many proposals for additions, deletions, and changes to the base documents during its deliberations. A concerted effort was made to codify existing practice wherever unambiguous and consistent practice could be identified. However, where no consistent practice could be identified, the Committee worked to establish clear rules that were consistent with the overall flavor of the language.
This document was approved as an American National Standard by the American National Standards Institute (ANSI) on DD MM, 1988. Suggestions for improvement of this Standard are welcome. They should be sent to the American National Standards Institute, 1430 Broadway, New York, NY 10018.
The Standard was processed and approved for submittal to ANSI by the American National Standards Committee on Computers and Information Processing, X3. Committee approval of the Standard does not necessarily imply that all members voted for its approval. At the time that it approved this Standard, the X3 Committee had the following members:
Organization Name of Representative
(To be completed on approval of the Standard.)
Technical Committee X3J11 on the C Programming Language had the following members at the time they forwarded this document to X3 for processing as an American National Standard:
Chair Jim Brodie Vice-Chair Thomas Plum Plum Hall Secretary P. J. Plauger Whitesmiths, Ltd. International Representative P. J. Plauger Whitesmiths, Ltd. Steve Hersee Lattice, Inc. Vocabulary Representative Andrew Johnson Prime Computer
Environment Subcommittee Chairs Ralph Ryan Microsoft Ralph Phraner Phraner Associates Language Subcommittee Chair Lawrence Rosler AT&T Library Subcommittee Chair P. J. Plauger Whitesmiths, Ltd. Draft Redactor David F. Prosser AT&T Lawrence Rosler AT&T Rationale Redactor Randy Hudson Intermetrics, Inc.
In the following list, unmarked names denote principal members and * denotes alternate members. David F. Prosser, AT&T Steven J. Adamski, AT&T* (X3H2 SQL liaison) Bob Gottlieb, Alliant Computer Systems Kevin Brosnan, Alliant Computer Systems Neal Weidenhofer, Amdahl Philip C. Steel, American Cimflex Eric McGlohon, American Cimflex* Stephen Kafka, Analog Devices Kevin Leary, Analog Devices* Gordon Sterling, Analog Devices* John Peyton, Apollo Computer Elizabeth Crockett, Apple Computers Ed Wells, Arinc Tom Ketterhagen, Arinc* Vaughn Vernon, Aspen Scientific Craig Bordelon, Bell Communications Research Steve Carter, Bell Communications Research* William Puig, Bell Communications Research* Bob Jervis, Borland International Yom-Tov Meged, Boston Systems Office Rose Thomson, Boston Systems Office* Maurice Fathi, COSMIC John Wu, Charles River Data Systems Daniel Mickey, Chemical Abstracts Service Thomas Mimlitch, Chemical Abstracts Service* Alan Losoff, Chicago Research & Trading Group Edward Briggs, Citibank Firmo Freire, Cobra S/A Jim Patterson, Cognos Bruce Tetelman, Columbia U. Center for Computing Terry Moore, CompuDas Mark Barrenechea, Computer Associates George Eberhardt, Computer Innovations Dave Neathery, Computer Innovations* Joseph Bibbo, Computrition Steve Davies, Concurrent Computer Corporation Don Fosbury, Control Data George VandeBunte, Control Data* Lloyd Irons, Cormorant Communications Tom MacDonald, Cray Research Lynne Johnson, Cray Research* Dave Becker, Cray Research* Jean Risley, Custom Development Environments Rex Jaeschke, DEC Professional Mike Terrazas, DECUS Representative Michael Meissner, Data General Mark Harris, Data General* Leonard Ohmes, Datapoint James Stanley, Data Systems Analysts Samuel J. Kendall, Delft Consulting Randy Meyers, Digital Equipment Corporation Art Bjork, Digital Equipment Corporation* Lu Anne Van de Pas, Digital Equipment Corporation* Ben Patel, EDS Richard Relph, EPI Graham Andrews, Edinburgh Portable Compilers Colin McPhail, Edinburgh Portable Compilers* J. Stephen Adamczyk, Edison Design Group Eric Schwarz, Edison Design Group* Dmitry Lenkov, Everest Solutions Frank Farance, Farance Inc. Peter Hayes, Farance Inc.* Florin Jordan, Floradin Philip Provin, General Electric Information Services Liz Sanville, Gould CSD Tina Aleksa, Gould CSD* Thomas Kelly, HCR Corporation Paul Jackson, HCR Corporation* Gary Jeter, Harris Computer Systems Sue Meloy, Hewlett Packard Larry Rosler, Hewlett Packard* Michelle Ruscetta, Hewlett Packard* Thomas E. Osten, Honeywell Information Systems David Kayden, Honeywell Information Systems* Shawn Elliott, IBM Larry Breed, IBM* Mel Goldberg, IBM* Mike Banahan, Instruction Set Clark Nelson, Intel Dan Lau, Intel* John Wolfe, InterACT Lillian Toll, InterACT* Randy Hudson, Intermetrics Keith Winter, International Computers Ltd. Honey M. Schrecker, International Computers Ltd.* Jim Brodie, J. Brodie & Associates Jacklin Kotikian, Kendall Square Research W. Peter Hesse, LSI Logic Europe Ltd. John Kaminski, Language Processors Inc. David Yost, Laurel Arts Mike Branstetter, Lawrence Livermore National Laboratory Bob Weaver, Los Alamos National Laboratory Lidia Eberhart, Modcomp Robert Sherry, Manx Software Courtney Meissen, Mark Williams Co. Patricia Jenkins, Masscomp Dave Hinman, Masscomp* Michael Kearns, MetaLink Tom Pennello, MetaWare Incorporated David F. Weil, Microsoft Mitch Harder, Microsoft* Kim Kempf, Microware Systems Shane McCarron, Minnesota Educational Computing Bruce Olsen, Mosaic Technologies Michael Paton, Motorola Rick Schubert, NCR Brian Johnson, NCR* Joseph Mueller, National Semiconductor Derek Godfrey, National Semiconductor* Jim Upperman, National Bureau of Standards James W. Williams, Naval Research Laboratory Lisa Simon, OCLC Paul Amaranth, Oakland University August R. Hansen, Omniware Michael Rolle, Oracle Carl Ellis, Oregon Software Barry Hedquist, Perennial Sassan Hazeghi, Peritus International James Holmlund, Peritus International* Thomas Plum, Plum Hall Christopher Skelly, Plum Hall* Andrew Johnson, Prime Computer Fran Litterio, Prime Computer* Daniel J. Conrad, Prismatics David Fritz, Production Languages Kenneth Pugh, Pugh Killeen Ed Ramsey, Purdue University Stephen Roberts, Purdue University* Kevin Nolan, Quantitative Technology Corp. Robert Mueller, Quantitative Technology Corp.* Chris DeVoney, Que Corporation Jon Tulk, Rabbit Software Terry Colligan, Rational Systems Daniel Saks, Saks & Associates Nancy Saks, Saks & Associates* Oliver Bradley, SAS Institute Alan Beale, SAS Institute* Larry Jones, SDRC Donald Kossman, SEI Information Technology Kenneth Harrenstien, SRI International Larry Rosenthal, Sierra Systems Phil Hempfner, Southern Bell Telephone Purshotam Rajani, Spruce Technology Savu Savulescu, Stagg Systems Peter Darnell, Stellar Computer Lee W. Cooprider, Stellar Computer* Paul Gilmartin, Storage Technology Corp. Steve Muchnick, Sun Microsystems Chuck Rasbold, Supercomputer Systems, Inc. Kelly O'Hair, Supercomputer Systems, Inc.* Henry Richardson, Tandem John M. Hausman, Tandem* Samuel Harbison, Tartan Laboratories Michael S. Ball, TauMetric Carl Sutton, Tektronix Jim Besemer, Tektronix* Reid Tatge, Texas Instruments Ed Brower, Tokheim Robert Mansfield, Tokheim* Monika Khushf, Tymlabs Morgan Jones, Tymlabs* Don Bixler, Unisys Steve Bartels, Unisys* Glenda Berkheimer, Unisys* Annice Jackson, Unisys* Fred Blonder, University of Maryland Fred Schwarz, University of Michigan R. Jordan Kreindler, University of Southern California CTC Mike Carmody, University of Waterloo Douglas Gwyn, US Army BRL (IEEE P1003 liaison) C. Dale Pierce, US Army Management Engineering* John C. Black, VideoFinancial Joseph Musacchia, Wang Labs Fred Rozakis, Wang Labs* P. J. Plauger, Whitesmiths, Ltd. Kim Leeper, Wick Hill Mark Wittenberg, Zehntel Jim Balter Robert Bradbury Edward Chin Neil Daniels Stephen Desofi Michael Duffy Phillip Escue Ralph Phraner D. Hugh Redelmeier Arnold Davi Robbins Roger Wilks Michael J. Young
[Contents] [Previous] [Next] [Home]
NDP77
http://www.ndp77.net
webmaster Massimo F. ARENA
webmaster@ndp77.net