(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). 

A.1.1 Lexical grammar

A.1.1.1 Tokens














                  each non-white-space character that cannot be one of the above

A.1.1.2 Keywords

         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

A.1.1.3 Identifiers


                  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

A.1.1.4 Constants





                   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-sequence digit

                   f  l  F  L

                   decimal-constant integer-suffix<opt>

                  octal-constant integer-suffix<opt>

                  hexadecimal-constant integer-suffix<opt>


                  decimal-constant digit


                  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


                   ' c-char-sequence'

                  L' c-char-sequence'


                  c-char-sequence c-char

                   any member of the source character set except

                           the single-quote ', backslash \, or new-line character





                   \'  \"  \?  \\

                  \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

A.1.1.5 String literals

                   " s-char-sequence<opt>"

                  L" s-char-sequence<opt>"


                  s-char-sequence s-char

                   any member of the source character set except

                           the double-quote ", backslash \, or new-line character


A.1.1.6 Operators

                   [  ]  (  )  .  ->

                  ++  --  &  *  +  -  ~  !  sizeof

                  /  %  <<  >>  <  >  <=  >=  =^=  !=  ^  |  &&  ||

                  ?  :

                  =  *=  /=  %=  +=  -=  <<=  >>=  &=  ^=  |=

                  ,  #  ##

A.1.1.7 Punctuators

                   [  ]  (  )  {  }  *  ,  :  =  ;  ...  #

A.1.1.8 Header names

                   < h-char-sequence>

                  " q-char-sequence"


                  h-char-sequence h-char

                   any member of the source character set except

                           the new-line character and >


                  q-char-sequence q-char

                   any member of the source character set except

                           the new-line character and "

A.1.1.9 Preprocessing numbers


                  .  digit

                  pp-number  digit

                  pp-number  nondigit

                  pp-number e  sign

                  pp-number E  sign

                  pp-number .

A.1.2 Phrase structure grammar

A.1.2.1 Expressions




                  (  expression )


                  postfix-expression [  expression ]

                  postfix-expression (  argument-expression-list<opt> )

                  postfix-expression .   identifier

                  postfix-expression ->  identifier

                  postfix-expression ++

                  postfix-expression --


                  argument-expression-list ,  assignment-expression


                  ++  unary-expression

                  --  unary-expression

                  unary-operator cast-expression

                  sizeof  unary-expression

                  sizeof (  type-name )

                  &  *  +  -  ~  !


                  (  type-name )  cast-expression


                  multiplicative-expression *  cast-expression

                  multiplicative-expression /  cast-expression

                  multiplicative-expression %  cast-expression


                  additive-expression +  multiplicative-expression

                  additive-expression -  multiplicative-expression


                  shift-expression <<  additive-expression

                  shift-expression >>  additive-expression


                  relational-expression <   shift-expression

                  relational-expression >   shift-expression

                  relational-expression <=  shift-expression

                  relational-expression >=  shift-expression


                  equality-expression =^=  relational-expression

                  equality-expression !=  relational-expression


                  AND-expression &  equality-expression


                  exclusive-OR-expression ^  AND-expression


                  inclusive-OR-expression |  exclusive-OR-expression


                  logical-AND-expression &&  inclusive-OR-expression


                  logical-OR-expression ||  logical-AND-expression


                  logical-OR-expression ?  expression :  conditional-expression


                  unary-expression assignment-operator assignment-expression

                   =  *=  /=  %=  +=  -=  <<=  >>=  &=  ^=  |=


                  expression ,  assignment-expression


A.1.2.2 Declarations

                  declaration-specifiers init-declarator-list<opt> ;

                  storage-class-specifier declaration-specifiers<opt>

                  type-specifier declaration-specifiers<opt>

                  type-qualifier declaration-specifiers<opt>


                  init-declarator-list ,  init-declarator


                  declarator =  initializer


















                  struct-or-union identifier<opt> {  struct-declaration-list }

                  struct-or-union identifier




                  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-list ,  struct-declarator


                  declarator<opt> :  constant-expression

                  enum  identifier<opt> {  enumerator-list }

                  enum  identifier


                  enumerator-list ,  enumerator


                  enumeration-constant =  constant-expression



                   pointer<opt> direct-declarator


                  (  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-list type-qualifier


                  parameter-list , ...


                  parameter-list ,  parameter-declaration

                  declaration-specifiers declarator

                  declaration-specifiers abstract-declarator<opt>


                  identifier-list ,  identifier

                   specifier-qualifier-list abstract-declarator<opt>


                  pointer<opt> direct-abstract-declarator

                   (  abstract-declarator )

                  direct-abstract-declarator<opt> [  constant-expression<opt> ]

                  direct-abstract-declarator<opt> (  parameter-type-list<opt> )



                  {  initializer-list }

                  {  initializer-list , }


                  initializer-list ,  initializer

 A.1.2.3 Statements







                   identifier :  statement

                  case  constant-expression :  statement

                  default :  statement

                   {  declaration-list<opt> statement-list<opt> }


                  declaration-list declaration


                  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> ;

A.1.2.4 External definitions


                  translation-unit external-declaration



                  declaration-specifiers<opt> declarator declaration-list<opt> compound-statement

A.1.3 Preprocessing directives



                  group group-part

                  pp-tokens<opt> new-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-groups elif-group

                  # elif    constant-expression new-line group<opt>

                  # else    new-line group<opt>

                  # endif   new-line


                  the left-parenthesis character without preceding white space



                  pp-tokens preprocessing-token

                  the new-line character


   The following are the sequence points described in $ 

 * The call to a function, after the arguments have been evaluated ($ 

 * 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 ($; the expression in a return statement ($ 


A.3.1 ERRORS <errno.h>






         offsetof( type,  member-designator)




A.3.3 DIAGNOSTICS <assert.h>


         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);

A.3.5 LOCALIZATION <locale.h>








         struct lconv

         char *setlocale(int category, const char *locale);

         struct lconv *localeconv(void);

A.3.6 MATHEMATICS <math.h>


         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);

A.3.7 NON-LOCAL JUMPS <setjmp.h>


         int setjmp(jmp_buf env);

         void longjmp(jmp_buf env, int val);

A.3.8 SIGNAL HANDLING <signal.h>











         void (*signal(int sig, void (*func)(int)))(int);

         int raise(int sig);



         void va_start(va_list ap,  parmN);

          type va_arg(va_list ap,  type);

         void va_end(va_list ap);

A.3.10 INPUT/OUTPUT <stdio.h>




















         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);

A.3.11 GENERAL UTILITIES <stdlib.h>










         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);

 A.3.12 STRING HANDLING <string.h>



         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);

 A.3.13 DATE AND TIME <time.h>






         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 $ 

         #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 $ 

         #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 ($ 

 * An integer character constant includes more than one character or a wide character constant includes more than one multibyte character ($ 

 * 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 ($ 

 * 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 ($ 

 * 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 ($ 

 * 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 ($ 

 * 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. 

A.6.1 Unspecified behavior

   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 ($ 

 * 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 ($ 

 * The alignment of the addressable storage unit allocated to hold a bit-field ($ 

 * The layout of storage for parameters ($3.7.1). 

 * The order in which # and ## operations are evaluated during macro substitution ($ 

 * Whether errno is a macro or an external identifier ($4.1.3). 

 * Whether setjmp is a macro or an external identifier ($ 

 * Whether va_end is a macro or an external identifier ($ 

 * 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 ($ 

 * The details of the value stored by the fgetpos function on success ($ 

 * The details of the value returned by the ftell function for a text stream on success ($ 

 * 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 ($ 

 * The order in an array sorted by the qsort function of two members that compare as equal ($ 

 * The encoding of the calendar time returned by the time function ($ 

A.6.2 Undefined behavior

   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 ($ 

 * 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 ($ 

 * 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 ($ 

 * An identifier is used that is not visible in the current scope ($ 

 * 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 ($ 

 * An identifier with external linkage is used but there does not exist exactly one external definition in the program for the identifier ($ 

 * The value stored in a pointer that referred to an object with automatic storage duration is used ($ 

 * Two declarations of the same object or function specify types that are not compatible ($ 

 * An unspecified escape sequence is encountered in a character constant or a string literal ($ 

 * 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 ($ 

 * The value of a void expression is used or an implicit conversion (except to void ) is applied to a void expression ($ 

 * 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 ($ 

 * For a function call without a function prototype, the number of arguments does not agree with the number of parameters ($ 

 * 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 ($ 

 * If a function is called with a function prototype and the function is not defined with a compatible type ($ 

 * A function that accepts a variable number of arguments is called without a function prototype that ends with an ellipsis ($ 

 * An invalid array reference, null pointer reference, or reference to an object declared with automatic storage duration in a terminated block occurs ($ 

 * 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 ($ 

 * 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 ($ 

 * 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 ($ 

 * 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 ) ($ 

 * 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 ($ 

 * The longjmp function is invoked from a nested signal routine ($ 

 * 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 ($ 

 * 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 ($ 

 * 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 ($ 

 * There is no actual next argument for a va_arg macro invocation ($ 

 * The type of the actual next argument in a variable argument list disagrees with the type specified by the va_arg macro ($ 

 * The va_end macro is invoked without a corresponding invocation of the va_start macro ($ 

 * A return occurs from a function with a variable argument list initialized by the va_start macro before the va_end macro is invoked ($ 

 * The stream for the fflush function points to an input stream or to an update stream in which the most recent operation was input ($ 

 * 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 ($ 

 * 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 ($ 

 * 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 ($ 

 * 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 ($ 

 * 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 ) ($ 

 * A single conversion by the fprintf function produces more than 509 characters of output ($ 

 * 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 ($ 

 * 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 ($ 

 * 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 ($ 

 * 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 ($ 

 * 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 ($ 

A.6.3 Implementation-defined behavior

   Each implementation shall document its behavior in each of the areas listed in this section.  The following are implementation-defined:

A.6.3.1 Environment

 * The semantics of the arguments to main ($ 

 * What constitutes an interactive device ($ 

A.6.3.2 Identifiers

 * 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). 

A.6.3.3 Characters

 * 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 $ 

 * The number of bits in a character in the execution character set ($ 

 * The mapping of members of the source character set (in character constants and string literals) to members of the execution character set ($ 

 * 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 ($ 

 * 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 ($ 

 * The current locale used to convert multibyte characters into corresponding wide characters (codes) for a wide character constant ($ 

 * Whether a ``plain'' char has the same range of values as signed char or unsigned char ($ 

A.6.3.4 Integers

 * The representations and sets of values of the various types of integers ($ 

 * 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 ($ 

 * 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). 

A.6.3.5 Floating point

 * The representations and sets of values of the various types of floating-point numbers ($ 

 * The direction of truncation when an integral number is converted to a floating-point number that cannot exactly represent the original value ($ 

 * The direction of truncation or rounding when a floating-point number is converted to a narrower floating-point number ($ 

A.6.3.6 Arrays and pointers

 * The type of integer required to hold the maximum size of an array --- that is, the type of the sizeof operator, size_t ($, $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). 

A.6.3.7 Registers

 * The extent to which objects can actually be placed in registers by use of the register storage-class specifier ($3.5.1). 

A.6.3.8 Structures, unions, enumerations, and bit-fields

 * A member of a union object is accessed using a member of a different type ($ 

 * The padding and alignment of members of structures ($  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 ($ 

 * The order of allocation of bit-fields within an int ($ 

 * Whether a bit-field can straddle a storage-unit boundary ($ 

 * The integer type chosen to represent the values of an enumeration type ($ 

A.6.3.9 Qualifiers

 * What constitutes an access to an object that has volatile-qualified type ($ 

A.6.3.10 Declarators

 * The maximum number of declarators that may modify an arithmetic, structure, or union type ($3.5.4). 

A.6.3.11 Statements

* The maximum number of case values in a switch statement ($ 

A.6.3.12 Preprocessing directives

 * 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). 

A.6.3.13 Library functions

 * 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 ($ 

 * The set of signals for the signal function ($ 

 * The semantics for each signal recognized by the signal function ($ 

 * The default handling and the handling at program startup for each signal recognized by the signal function ($ 

 * 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 ($ 

 * Whether the default handling is reset if the SIGILL signal is received by a handler specified to the signal function ($ 

 * 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 ($ 

 * The effect if a file with the new name exists prior to a call to the rename function ($ 

 * The output for %p conversion in the fprintf function ($ 

 * The input for %p conversion in the fscanf function ($ 

 * The interpretation of a - character that is neither the first nor the last character in the scanlist for %[ conversion in the fscanf function ($ 

 * The value to which the macro errno is set by the fgetpos or ftell function on failure ($, $ 

 * The messages generated by the perror function ($ 

 * 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 ($ 

 * The status returned by the exit function if the value of the argument is other than zero, EXIT_SUCCESS , or EXIT_FAILURE ($ 

 * The set of environment names and the method for altering the environment list used by the getenv function ($ 

 * The contents and mode of execution of the string by the system function ($ 

 * The contents of the error message strings returned by the strerror function ($ 

 * The local time zone and Daylight Saving Time ($4.12.1). 

 * The era for the clock function ($ 

A.6.4 Locale-specific Behavior

   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 ($ 

 * The formats for time and date ($ 

A.6.5 Common extensions

   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. 

A.6.5.1 Environment arguments

   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 ($ 

A.6.5.2 Specialized identifiers

   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). 

A.6.5.3 Lengths and cases of identifiers

   All characters in identifiers (with or without external linkage) are significant and case distinctions are observed ($3.1.2). 

A.6.5.4 Scopes of identifiers

   A function identifier, or the identifier of an object the declaration of which contains the keyword extern , has file scope ($ 

A.6.5.5 Writable string literals

   String literals are modifiable.  Identical string literals shall be distinct ($3.1.4). 

A.6.5.6 Other arithmetic types

   Other arithmetic types, such as long long int , and their appropriate conversions are defined ($ 

A.6.5.7 Function pointer casts

   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). 

A.6.5.8 Non-int bit-field types

   Types other than int , unsigned int , or signed int can be declared as bit-fields, with appropriate maximum widths ($ 

A.6.5.9 The fortran keyword

   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 ($ 

A.6.5.10 The asm keyword

   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 );


A.6.5.11 Multiple external definitions

   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.6.5.12 Empty macro arguments

   A macro argument may consist of no preprocessing tokens ($3.8.3). 

A.6.5.13 Predefined macro names

   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). 

A.6.5.14 Extra arguments for signal handlers

   Handlers for specific signals may be called with extra arguments in addition to the signal number ($ 

A.6.5.15 Additional stream types and file-opening modes

   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 ($ 

A.6.5.16 Defined file position indicator

   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 ($ 


   Only major references are listed.

absolute-value functions,, abstract declarator, type name, 3.5.5 abstract machine, abstract semantics, active position, 2.2.2 addition assignment operator, +=, addition operator, +, 3.3.6 additive expressions, 3.3.6 address operator, &, aggregate type, alert escape sequence, \a, 2.2.2, alignment, definition of, 1.6 alignment of structure members, AND operator, bitwise, &, 3.3.10 AND operator, logical, &&, 3.3.13 argument, function, argument, 1.6 argument promotion, default, arithmetic conversions, usual, arithmetic operators, unary, arithmetic type, array declarator, array parameter, 3.7.1 array subscript operator, [ ], array type, array type conversion, arrow operator, ->, ASCII character set, assignment operators, 3.3.16 asterisk punctuator, *, 3.1.6, automatic storage, reentrancy,, 2.2.3 automatic storage duration, backslash character, \,, 2.2.1 backspace escape sequence, \b, 2.2.2, base documents, 1.5 basic character set, 1.6, 2.2.1 basic type, binary stream, 4.9.2 bit, definition of, 1.6 bit, high-order, 1.6 bit, low-order, 1.6 bit-field structure member, bitwise operators, 3.3, 3.3.7, 3.3.10, 3.3.11, 3.3.12 block, 3.6.2 block identifier scope, braces punctuator, { }, 3.1.6, 3.5.7, 3.6.2 brackets punctuator, [ ], 3.1.6,, broken-down-time type, 4.12.1 byte, definition of, 1.6 C program, 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, 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.2.1, 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,, 3.1.4 character testing functions, 4.3.1 character type,,, 3.5.7 character type conversion, collating sequence, character set, 2.2.1 colon punctuator, :, 3.1.6, comma operator, ,, 3.3.17 command processor, comment delimiters, /* */, 3.1.9 comments,, 3.1, 3.1.9 common initial sequence, comparison functions, 4.11.4 compatible type,, 3.5.2, 3.5.3, 3.5.4 complement operator, ~, compliance, 1.7 composite type, compound assignment operators, 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.5.3 constant, character, constant, enumeration, 3.1.2, constant, floating, constant, integer, constant, primary expression, 3.3.1 constant expressions, 3.4 constants, 3.1.3 constraints, definition of, 1.6 content, structure/union/enumeration, contiguity, memory allocation, 4.10.3 control characters, 2.2.1, 4.3.1, conversion, arithmetic operands, 3.2.1 conversion, array, conversion, characters and integers, conversion, explicit, 3.2 conversion, floating and integral, conversion, floating types,, conversion, function, conversion, function arguments,, 3.7.1 conversion, implicit, 3.2 conversion, pointer,, conversion, signed and unsigned integers, conversion, void type, conversions, 3.2 conversions, usual arithmetic, copying functions, 4.11.2 data streams, 4.9.2 date and time header, 4.12 decimal constant, 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.5.4 decrement operator, postfix, --, decrement operator, prefix, --, default argument promotions, definition, 3.5 derived declarator types, derived types, device input/output, diagnostics, diagnostics, assert.h, 4.2 direct input/output functions, 4.9.8 display device, 2.2.2 division assignment operator, /=, division operator, /, 3.3.5 documentation of implementation, 1.7 domain error, 4.5.1 dot operator, ., double-precision arithmetic, element type, ellipsis, unspecified parameters, , ..., end-of-file macro, EOF, 4.3, 4.9.1 end-of-file indicator, 4.9.1, end-of-line indicator, 2.2.1 enumerated types, enumeration constant, 3.1.2, enumeration content, enumeration members, enumeration specifiers, enumeration tag, enumerator, environment, 2 environment functions, 4.10.4 environment list, 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, error indicator, 4.9.1,, escape sequences, 2.2.1, 2.2.2, evaluation, 3.1.5, 3.3 exception, 3.3 exclusive OR assignment operator, ^=, exclusive OR operator, ^, 3.3.11 executable program, execution environment, character sets, 2.2.1 execution environment limits, execution environments, 2.1.2 execution sequence,, 3.6 explicit conversion, 3.2 exponent part, floating constant, 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, external definitions, 3.7 external identifiers, underscore, 4.1.2 external linkage, 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.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, floating suffix, f or F, floating types, floating-point numbers, form-feed character, 2.2.1, 3.1 form-feed escape sequence, \f, 2.2.2, formatted input/output functions, 4.9.6 forward references, definition of, 1.6 freestanding execution environment, 2.1.2, full expression, 3.6 fully buffered stream, 4.9.3 function, definition of, 1.6, function, recursive call, function argument, function body, 3.7, 3.7.1 function call, function call, library, 4.1.6 function declarator, function definition,, 3.7.1 function designator, function identifier scope, function image, 2.2.3 function library,, 4.1.6 function parameter,, function prototype,,,, 3.7.1 function prototype identifier scope, function return, function type, function type conversion, function-call operator, ( ), 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, hexadecimal digit,, hexadecimal escape sequence, high-order bit, 1.6 horizontal-tab character, 2.2.1, 3.1 horizontal-tab escape sequence, \t, 2.2.2, hosted execution environment, 2.1.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, identifier list, 3.5.4 identifier name space, identifier scope, identifier type, IEEE floating-point arithmetic standard, implementation, definition of, 1.6 implementation limits, 1.6, 2.2.4 implementation-defined behavior, 1.6 implicit conversion, 3.2 implicit function declaration, inclusive OR assignment operator, |=, inclusive OR operator, |, 3.3.12 incomplete type, increment operator, postfix, ++, increment operator, prefix, ++, indirection operator, *, inequality operator, !=, 3.3.9 initialization, 2.1.2,,, 3.5.7, 3.6.2 initializer, string literal,, 3.5.7 initializer braces, 3.5.7 initial shift state,, 4.10.7 input/output, device, input/output header, 4.9 integer arithmetic functions, 4.10.6 integer character constant, integer constants, integer suffix, integer type, integer type conversion,, integral constant expression, 3.4 integral promotions,, integral type, integral type conversion, interactive device,, 4.9.3, internal linkage, internal name, 3.1.2 interrupt handler,, 2.2.3, 4.7 ISO 4217 Currency and Funds Representation, 1.3, ISO 646 Invariant Code Set, 1.3, iteration statements, 3.6.5 jump statements, 3.6.6 keywords, 3.1.1 label name,, labeled statements, 3.6.1 language, 3 language, future directions, 3.9 leading underscore in identifiers, 4.1.2 left-shift assignment operator, <<=, left-shift operator, <<, 3.3.7 length function, less-than operator, <, 3.3.8 less-than-or-equal-to operator, <=, 3.3.8 letter, 4.1.1 lexical elements,, 3.1 library,, 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, limits, translation, line buffered stream, 4.9.3 line number, 3.8.4 lines,, 3.8, 4.9.2 linkages of identifiers, locale, definition of, 1.6 localization, 4.4 logarithmic functions, 4.5.4 logical AND operator, &&, 3.3.13 logical negation operator, !, logical OR operator, ||, 3.3.14 logical source lines, long double suffix, l or L, long integer suffix, l or L, low-order bit, 1.6 lvalue,, 3.3.1,,, 3.3.16 macro function vs. definition, 4.1.6 macro name definition, macro names, predefined, 3.8.8 macro, redefinition of, 3.8.3 macro replacement, 3.8.3 member-access operators, . and ->, memory management functions, 4.10.3 minus operator, unary, -, modifiable lvalue, modulus function, multibyte characters,,, 4.10.7, 4.10.8 multibyte functions, 4.10.7, 4.10.8 multiplication assignment operator, *=, multiplication operator, *, 3.3.5 multiplicative expressions, 3.3.5 name, file, 4.9.3 name spaces of identifiers, nearest-integer functions, 4.5.6 new-line character,, 2.2.1, 3.1, 3.8, 3.8.4 new-line escape sequence, \n, 2.2.2, nongraphic characters, 2.2.2, 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.4 null pointer, null pointer constant, null preprocessing directive, 3.8.7 null statement, 3.6.3 number, floating-point, numerical limits, object, definition of, 1.6 object type, obsolescence, 1.8, 3.9, 4.13 octal constant, octal digit,, octal escape sequence, operand, 3.1.5, 3.3 operating system,, operator, unary, 3.3.3 operators, 3.1.5, 3.3 OR assignment operator, exclusive, ^=, OR assignment operator, inclusive, |=, 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, padding, null character, 4.9.2 parameter, ellipsis, , ..., parameter, function, parameter, main function, parameter, 1.6 parameter type list, parameters, program, parentheses punctuator, ( ), 3.1.6, parenthesized expression, 3.3.1 physical source lines, plus operator, unary, +, pointer, null, pointer declarator, pointer operator, ->, pointer to function returning type, pointer type, pointer type conversion,, portability of implementations, 1.7 position indicator, file, 4.9.3 postfix decrement operator, --, postfix expressions, 3.3.2 postfix increment operator, ++, power functions, 4.5.5 precedence of expression operators, 3.3 precedence of syntax rules, predefined macro names, 3.8.8 prefix decrement operator, --, prefix increment operator, ++, preprocessing concatenation,, 3.8.3 preprocessing directives,, 3.8 preprocessing numbers, 3.1, 3.1.8 preprocessing tokens,, 3.1, 3.8 primary expressions, 3.3.1 printing characters, 2.2.2, 4.3.1, program, conforming, 1.7 program, strictly conforming, 1.7 program diagnostics, 4.2.1 program execution, program file, program image, program name, argv[0], program parameters, program startup, 2.1.2,, program structure, program termination, 2.1.2,,, promotions, default argument, promotions, integral,, prototype, function,,,, 3.7.1 pseudo-random sequence functions, 4.10.2 punctuators, 3.1.6 qualified types, range error, 4.5.1 recursive function call, redefinition of macro, 3.8.3 reentrancy,, 2.2.3 referenced type, relational expressions, 3.3.8 reliability of data, interrupted, remainder assignment operator, %=, remainder operator, %, 3.3.5 restore calling environment function, reserved identifiers, 4.1.2 right-shift assignment operator, >>=, right-shift operator, >>, 3.3.7 rvalue, save calling environment function, scalar type, scope of identifiers, search functions,, 4.11.5 selection statements, 3.6.4 semicolon punctuator, ;, 3.1.6, 3.5, 3.6.3 sequence points,, 3.3, 3.6 shift expressions, 3.3.7 shift states,, 4.10.7 side effects,, 3.3 signal handler, 2.2.3, signals,, 2.2.3, 4.7 signed integer types,,, simple assignment operator, =, single-precision arithmetic, sort function, source character set, 2.2.1 source file inclusion, 3.8.2 source files, source text, space character,, 2.2.1, 3.1 standard streams, 4.9.1, 4.9.3 standard header, float.h, 1.7,, 4.1.4 standard header, limits.h, 1.7,, 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,, 4.10.7 statements, 3.6 static storage duration, storage duration, 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, string literal,, 2.2.1, 3.1.4, 3.3.1, 3.5.7 structure/union arrow operator, ->, structure/union content, structure/union dot operator, ., structure/union member name space, structure/union specifiers, structure/union tag, structure/union type,, subtraction assignment operator, -=, subtraction operator, -, 3.3.6 suffix, floating constant, suffix, integer constant, switch body, switch case label, 3.6.1, switch default label, 3.6.1, syntactic categories, 3 syntax notation, 3 syntax rules, precedence of, tab characters, 2.2.1 tabs, white space, 3.1 tag, enumeration, tag, structure/union, tag name space, 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,, 3.1, 3.8 top type, translation environment, 2.1.1 translation limits, translation phases, translation unit,, 3.7 trigonometric functions, 4.5.2 trigraph sequences,, type, character,,, 3.5.7 type, compatible,, 3.5.2, 3.5.3, 3.5.4 type, composite, type, const-qualified,, 3.5.3 type, function, type, incomplete, type, object, type, qualified, type, unqualified, type, volatile-qualified,, 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, unary arithmetic operators, unary expressions, 3.3.3 unary minus operator, -, unary operators, 3.3.3 unary plus operator, +, unbuffered stream, 4.9.3 undefined behavior, 1.6 underscore, leading, in identifiers, 4.1.2 union tag, union type specifier,, 3.5.2, unqualified type, unsigned integer suffix, u or U, unsigned integer types,, unspecified behavior, 1.6 usual arithmetic conversions, value part, floating constant, variable arguments header, 4.8 vertical-tab character, 2.2.1, 3.1 vertical-tab escape sequence, \v, 2.2.2, visibility of identifiers, void expression, volatile storage, volatile-qualified type,, 3.5.3 white space,, 3.1, 3.8, wide character, wide character constant, wide string literal,, 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]


webmaster Massimo F. ARENA