You are here:
OakRoadSystems : Articles : Technical : C Reserved Identifiers

C Reserved Identifiers

revised 15 Sep 2003
Copyright © 1992–2004 Stan Brown, Oak Road Systems

Summary:  The C standard reserves quite a few identifiers, meaning that you must not create variables, functions, or macros with those names. If you don't obey the restriction, you can have nasty subtle bugs in your program. This page lists the reserved identifiers and discusses the pitfalls.


You're welcome to print copies of this page for your own use, and to link from your own Web pages to this page. But please don't make any electronic copies and publish them on your Web page or elsewhere.

And for the litigious among us: The information here is offered without warranty of any kind. Sigh. Nevertheless, I intend to correct any errors that are drawn to my attention. Please let me know how you heard about this page when you send corrections and comments to me.


If you want to write a portable C program, you have to be careful not to give your own definitions to any of the identifiers that are reserved by the C standard. The standard tells you which identifiers are reserved, but scatters the information through a rather thick (and expensive) book.

The basic principles of reserved identifiers are in ISO subclause 7.1.3 (ANSI section, "Reserved Identifiers". There you are warned:

if a program declares or defines an identifier with the same name as an identifier reserved in that context .., the behavior is undefined.

That means that if your program contains a statement like "extern int log;", the compiler is fully justified in turning your terminal into a large wart hog. Yes, the standard allows (3.16/1.6) such behavior, though market forces (and the laws of physics!) might not support it. More Realistically, your program may or may not work right, and you may or may not get a diagnostic message.

This page is intended mostly for my fellow C compiler users. Compiler writers have a related but different set of concerns.

C and C++

These are two different languages. But C++ has its historical roots in C, and many C programs (and C programmers!) get converted to C++. The namespace feature of C++ makes it very much easier for programmers to avoid identifier collisions — except for the C++ keywords, which are a superset of the standard C keywords.

The C++ standard is written so that a C++ compiler can compile almost any correct C program and produce equivalent code. To keep your program from being one of the unlucky exceptions, you might want to avoid using the C++ keywords as identifiers. I've listed them in their alphabetical places in the table. On the other hand, if you're writing C++, please see my separate list of Identifiers to avoid in C++ programs.

Reference: Bjarne Stroustrup, The C++ Programming Language, Third Edition, section B.2.2, "C Code That Is Not C++".


This page reflects the first ISO/ANSI standard, finalized in 1989 ("C89"), with subsequent corrections and addenda. It does not yet reflect the new 1999 standard ("C99"). Realistically, I doubt I'll be updating it for C99 any time soon. C99 programmers should consult the standard or another good reference for the reserved identifiers added by the new standard.

When this page refers to "the standard" or "standard C", it takes several documents into account:

None of the official documents is available on the Web; they're sold by national standards bodies but at prices I can no longer afford. (For more information on how to acquire a copy of the standard, see Steve Summit's comp.lang.c FAQ.)

Clause and Section Numbers

The ISO and ANSI standards are substantively the same, but sections are numbered differently. Specifically, ANSI sections 2 through 4 correspond pretty closely (but not exactly) to ISO clauses 5 through 7.

The table of reserved identifiers below shows the ISO subclause and ANSI section numbers. In text, I show both numbers with the ISO number first, like this: 7.1.3/

contents ]  [ site map ]

Safety Tips

There are several kinds of safety to be considered:

On this page, I try to give you the information you need to choose your own level of safety. The table of reserved identifiers below includes a column showing the context in which each identifier is reserved.

My own preference is for maximum safety: I try never to use any identifier for my own purposes if it's in the C standard. This appeals to my simple mind because it's simple! <grin> But those context notations can be useful even so: if a program is misbehaving and you suspect a standard identifier has been used in a non-standard way, you can make sure by checking the context in the table.

You need to be aware of some surprising consequences of the standard: two identifiers can be spelled the same yet be distinct, or they can be spelled differently yet be the same, as I'll discuss next.

First Surprise: They Look Different, But They're the Same

Make sure that any names you define are unique in the first 31 characters for internal names, or 6 characters (upper and lower case not significant) for external names. The standard says (6.1.2/3.1.2) that conforming implementations can consider, for example, external names ABCDEFG and abcdefh to identify the same object or function.

This means that all identifiers which are "the same" as names of library functions under the external-names equivalence are also reserved for use as externals. For example, there is undefined behavior if you name a non-static function or global variable

cleared( )  CallOccasionally( )  reallocation
and Stratford( )

These conflict with

clearerr( )  calloc( )  realloc( )
and the reservation of stranything

Though these names are permitted for your use as macros, automatic variables, etc., I suggest that you always remember the possibility of confusing your fellow programmers and stay away from them.

Your compiler may not complain if you violate these constraints. For instance, your compiler may distinguish more than six characters for external names, or it may distinguish upper and lower case. But I think the rules are still worth following, because you never know when you'll have to port code to some other compiler that is not so discriminating, but still conforms to the letter of the standard.

Second Surprise: They Look the Same, But They're Different

(If you're going for maximum safety, ignore this section and just skip to the next section.)

Yes, it's possible to have two different identifiers that are spelled exactly the same. For instance, struct ceil doesn't conflict with the ceil( ) function, even if you've included the math.h header that declares it. And extern int grouping doesn't conflict with grouping, the member of struct lconv defined in locale.h. In fact, you can legally define a different structure of your own with a member called grouping. (It may be confusing to humans, but it's legal.)

There's no conflict because the identifiers in those examples are in different name spaces. The standard lists ( these separate name spaces:

An identifier in one name space won't conflict with an identically-named identifier in a different name space. (They also won't conflict if their scopes don't overlap, which is why you can name automatic variables in one function without worrying about the names of other functions or their automatic variables.)

Macro names have their own name space, according to ISO 6.8.3/ANSI 3.8.3: "There is one name space for macro names." But of course you must not create a conflict between a macro and an ordinary name.

contents ]  [ site map ]

The Reserved Identifiers

Groups of Reserved Identifiers

Respect that first entry in the table below: never make up any identifier that starts with an underscore.

(Actually, you can legally use an identifier that starts with an underscore if the second character is a lower-case letter or a digit, and the identifier is used inside a function or a function prototype or as a structure member or label. Easier just not to use leading underscores!)

There are various other table entries with "[any]". For instance, no matter which headers you use, you must never create (7.13/4.13) a non-static function or global variable that starts with the letters is, mem, str, to, or wcs followed by a lower-case letter. Additional classes of identifiers are reserved if you include particular headers, as indicated in the table.

The Table

Quick links to identifiers by initial letter:
_ | A | B | C | D | E | F | G-H | I-J | L | M | N-O | P-Q | R | S | T | U | V | W-X

Here's an explanation of the columns of the table:

identifier       context    header     ISO        ANSI
_[any]         (see Groups)           7.1.3
_[_A-Z][any]       all                7.1.3
__DATE__           all     (predef)   6.8.8      3.8.8
__FILE__           all     (predef)   6.8.8      3.8.8
__LINE__           all     (predef)   6.8.8      3.8.8
__STDC__           all     (predef)   6.8.8      3.8.8
__STDC_VERSION__   all     (predef)   NA1
__TIME__           all     (predef)   6.8.8      3.8.8
_IOFBF             H       stdio.h    7.9.1      4.9.1
_IOLBF             H       stdio.h    7.9.1      4.9.1
_IONBF             H       stdio.h    7.9.1      4.9.1
identifier       context    header     ISO        ANSI

abort              ext     stdlib.h
abs                ext     stdlib.h
acos               ext     math.h
acosf, acosl       ext     (future)   7.13.4     4.13.4
and                H/C++   iso646.h   NA1
and_eq             H/C++   iso646.h   NA1
asctime            ext     time.h
asin               ext     math.h
asinf, asinl       ext     (future)   7.13.4     4.13.4
asm                C++ only
assert             H       assert.h   7.2        4.2
atan               ext     math.h
atanf, atanl       ext     (future)   7.13.4     4.13.4
atan2              ext     math.h
atan2f, atan2l     ext     (future)   7.13.4     4.13.4
atexit             ext     stdlib.h
atof               ext     stdlib.h
atoi               ext     stdlib.h
atol               ext     stdlib.h
auto               all     (keyword)  6.1.1      3.1.1
identifier       context    header     ISO        ANSI

bitand             H/C++   iso646.h   NA1
bitor              H/C++   iso646.h   NA1
bool               C++ only
break              all     (keyword)  6.1.1      3.1.1
bsearch            ext     stdlib.h
btowc              extW    wchar.h    NA1
BUFSIZ             H       stdio.h    7.9.1      4.9.1
identifier       context    header     ISO        ANSI

calloc             ext     stdlib.h
case               all     (keyword)  6.1.1      3.1.1
catch              C++ only
ceil               ext     math.h
ceilf, ceill       ext     (future)   7.13.4     4.13.4
char               all     (keyword)  6.1.1      3.1.1
CHAR_BIT           H       limits.h
CHAR_MAX           H       limits.h
CHAR_MIN           H       limits.h
class              C++ only
clearerr           ext     stdio.h
clock              ext     time.h
clock_t (type)     H       time.h     7.12.1     4.12.1
CLOCKS_PER_SEC     H       time.h     7.12.1     4.12.1
compl              H/C++   iso646.h   NA1
const              all     (keyword)  6.1.1      3.1.1
const_cast         C++ only
continue           all     (keyword)  6.1.1      3.1.1
cos                ext     math.h
cosf               ext     (future)   7.13.4     4.13.4
cosh               ext     math.h
coshf, coshl       ext     (future)   7.13.4     4.13.4
cosl               ext     (future)   7.13.4     4.13.4
ctime              ext     time.h
currency_symbol    Hmem    locale.h   7.4        4.4
identifier       context    header     ISO        ANSI

DBL_DIG            H       float.h
DBL_EPSILON        H       float.h
DBL_MANT_DIG       H       float.h
DBL_MAX            H       float.h
DBL_MAX_10_EXP     H       float.h
DBL_MAX_EXP        H       float.h
DBL_MIN            H       float.h
DBL_MIN_10_EXP     H       float.h
DBL_MIN_EXP        H       float.h
decimal_point      Hmem    locale.h   7.4        4.4
default            all     (keyword)  6.1.1      3.1.1
defined            all     (predef)   6.8.8      3.8.8
delete             C++ only
difftime           ext     time.h
div                ext     stdlib.h
div_t (type)       H       stdlib.h   7.10       4.10
do                 all     (keyword)  6.1.1      3.1.1
double             all     (keyword)  6.1.1      3.1.1
dynamic_cast       C++ only
identifier       context    header     ISO        ANSI

E[0-9A-Z][any]     H       errno.h    7.13.1     4.13.1
EDOM               H       errno.h    7.1.4      4.1.3
EILSEQ             H       errno.h    NA1
else               all     (keyword)  6.1.1      3.1.1
enum               all     (keyword)  6.1.1      3.1.1
EOF                H       stdio.h    7.9.1      4.9.1
ERANGE             H       errno.h    7.1.4      4.1.3
errno              H       errno.h    7.1.4      4.1.3
exit               ext     stdlib.h
EXIT_FAILURE       H       stdlib.h   7.10       4.10
EXIT_SUCCESS       H       stdlib.h   7.10       4.10
exp                ext     math.h
expf, expl         ext     (future)   7.13.4     4.13.4
explicit           C++ only
export             C++ only
extern             all     (keyword)  6.1.1      3.1.1
identifier       context    header     ISO        ANSI

fabs               ext     math.h
fabsf, fabsl       ext     (future)   7.13.4     4.13.4
false              C++ only
fclose             ext     stdio.h
feof               ext     stdio.h
ferror             ext     stdio.h
fflush             ext     stdio.h
fgetc              ext     stdio.h
fgetpos            ext     stdio.h
fgets              ext     stdio.h
fgetwc             extW    wchar.h    NA1
fgetws             extW    wchar.h    NA1
FILE (type)        H       stdio.h    7.9.1      4.9.1
FILENAME_MAX       H       stdio.h    7.9.1      4.9.1
float              all     (keyword)  6.1.1      3.1.1
floor              ext     math.h
floorf, floorl     ext     (future)   7.13.4     4.13.4
FLT_DIG            H       float.h
FLT_EPSILON        H       float.h
FLT_MANT_DIG       H       float.h
FLT_MAX            H       float.h
FLT_MAX_10_EXP     H       float.h
FLT_MAX_EXP        H       float.h
FLT_MIN            H       float.h
FLT_MIN_10_EXP     H       float.h
FLT_MIN_EXP        H       float.h
FLT_RADIX          H       float.h
FLT_ROUNDS         H       float.h
fmod               ext     math.h
fmodf, fmodl       ext     (future)   7.13.4     4.13.4
fopen              ext     stdio.h
FOPEN_MAX          H       stdio.h    7.9.1      4.9.1
for                all     (keyword)  6.1.1      3.1.1
fpos_t (type)      H       stdio.h    7.9.1      4.9.1
fprintf            ext     stdio.h
fputc              ext     stdio.h
fputs              ext     stdio.h
fputwc             extW    wchar.h    NA1
fputws             extW    wchar.h    NA1
frac_digits        Hmem    locale.h   7.4        4.4
fread              ext     stdio.h
free               ext     stdlib.h
freopen            ext     stdio.h
frexp              ext     math.h
frexpf, frexpl     ext     (future)   7.13.4     4.13.4
friend             C++ only
fscanf             ext     stdio.h
fseek              ext     stdio.h
fsetpos            ext     stdio.h
ftell              ext     stdio.h
fwide              extW    wchar.h    NA1
fwprintf           extW    wchar.h    NA1
fwrite             ext     stdio.h
fwscanf            extW    wchar.h    NA1
identifier       context    header     ISO        ANSI

getc               ext     stdio.h
getchar            ext     stdio.h
getenv             ext     stdlib.h
gets               ext     stdio.h
getwc              extW    wchar.h    NA1
getwchar           extW    wchar.h    NA1
gmtime             ext     time.h
goto               all     (keyword)  6.1.1      3.1.1
grouping           Hmem    locale.h   7.4        4.4
HUGE_VAL           H       math.h     7.5        4.5
identifier       context    header     ISO        ANSI

if                 all     (keyword)  6.1.1      3.1.1
inline             C++ only
int                all     (keyword)  6.1.1      3.1.1
int_curr_symbol    Hmem    locale.h   7.4        4.4
int_frac_digits    Hmem    locale.h   7.4        4.4
INT_MAX            H       limits.h
INT_MIN            H       limits.h
is[a-z][any]       ext     (future)   7.13.2     4.13.2
isalnum            ext     ctype.h
isalpha            ext     ctype.h
iscntrl            ext     ctype.h
isdigit            ext     ctype.h
isgraph            ext     ctype.h
islower            ext     ctype.h
isprint            ext     ctype.h
ispunct            ext     ctype.h
isspace            ext     ctype.h
isupper            ext     ctype.h
iswalnum           extW    wctype.h   NA1
iswalpha           extW    wctype.h   NA1
iswcntrl           extW    wctype.h   NA1
iswctype           extW    wctype.h   NA1
iswdigit           extW    wctype.h   NA1
iswgraph           extW    wctype.h   NA1
iswlower           extW    wctype.h   NA1
iswprint           extW    wctype.h   NA1
iswpunct           extW    wctype.h   NA1
iswspace           extW    wctype.h   NA1
iswupper           extW    wctype.h   NA1
iswxdigit          extW    wctype.h   NA1
isxdigit           ext     ctype.h
jmp_buf (type)     H       setjmp.h   7.6        4.6
identifier       context    header     ISO        ANSI

L_tmpnam           H       stdio.h    7.9.1      4.9.1
labs               ext     stdlib.h
LC_[A-Z][any]      H       locale.h   7.13.3     4.13.3
LC_ALL             H       locale.h   7.4        4.4
LC_COLLATE         H       locale.h   7.4        4.4
LC_CTYPE           H       locale.h   7.4        4.4
LC_MONETARY        H       locale.h   7.4        4.4
LC_NUMERIC         H       locale.h   7.4        4.4
LC_TIME            H       locale.h   7.4        4.4
lconv (struct)     Htag    locale.h   7.4        4.4
LDBL_DIG           H       float.h
LDBL_EPSILON       H       float.h
LDBL_MANT_DIG      H       float.h
LDBL_MAX           H       float.h
LDBL_MAX_10_EXP    H       float.h
LDBL_MAX_EXP       H       float.h
LDBL_MIN           H       float.h
LDBL_MIN_10_EXP    H       float.h
LDBL_MIN_EXP       H       float.h
ldexp              ext     math.h
ldexpf, ldexpl     ext     (future)   7.13.4     4.13.4
ldiv               ext     stdlib.h
ldiv_t (type)      H       stdlib.h   7.10       4.10
localeconv         ext     locale.h
localtime          ext     time.h
log                ext     math.h
logf, logl         ext     (future)   7.13.4     4.13.4
log10              ext     math.h
log10f, log10l     ext     (future)   7.13.4     4.13.4
long               all     (keyword)  6.1.1      3.1.1
LONG_MAX           H       limits.h
LONG_MIN           H       limits.h
longjmp            ext     setjmp.h
identifier       context    header     ISO        ANSI

malloc             ext     stdlib.h
MB_CUR_MAX         H       stdlib.h   7.10       4.10
MB_LEN_MAX         H       limits.h
mblen              ext     stdlib.h
mbrlen             extW    wchar.h    NA1
mbrtowc            extW    wchar.h    NA1
mbsinit            extW    wchar.h    NA1
mbsrtowcs          extW    wchar.h    NA1
mbstate_t (type)   H       wchar.h    NA1
mbstowcs           ext     stdlib.h
mbtowc             ext     stdlib.h
mem[a-z][any]      ext     (future)   7.13.8     4.13.8
memchr             ext     string.h
memcmp             ext     string.h
memcpy             ext     string.h
memmove            ext     string.h
memset             ext     string.h
mktime             ext     time.h
modf               ext     math.h
modff, modfl       ext     (future)   7.13.4     4.13.4
mon_decimal_point  Hmem    locale.h   7.4        4.4
mon_grouping       Hmem    locale.h   7.4        4.4
mon_thousands_sep  Hmem    locale.h   7.4        4.4
mutable            C++ only
identifier       context    header     ISO        ANSI

n_cs_precedes      Hmem    locale.h   7.4        4.4
n_sep_by_space     Hmem    locale.h   7.4        4.4
n_sign_posn        Hmem    locale.h   7.4        4.4
namespace          C++ only
NDEBUG             H       assert.h   7.2        4.2
negative_sign      Hmem    locale.h   7.4        4.4
new                C++ only
not                H/C++   iso646.h   NA1
not_eq             H/C++   iso646.h   NA1
NULL               H       many       many
offsetof           H       stddef.h   7.1.6      4.1.5
operator           C++ only
or                 H/C++   iso646.h   NA1
or_eq              H/C++   iso646.h   NA1
identifier       context    header     ISO        ANSI

p_cs_precedes      Hmem    locale.h   7.4        4.4
p_sep_by_space     Hmem    locale.h   7.4        4.4
p_sign_posn        Hmem    locale.h   7.4        4.4
perror             ext     stdio.h
positive_sign      Hmem    locale.h   7.4        4.4
pow                ext     math.h
powf, powl         ext     (future)   7.13.4     4.13.4
printf             ext     stdio.h
private            C++ only
protected          C++ only
ptrdiff_t (type)   H       stddef.h   7.1.6      4.1.5
public             C++ only
putc               ext     stdio.h
putchar            ext     stdio.h
puts               ext     stdio.h
putwc              extW    wchar.h    NA1
putwchar           extW    wchar.h    NA1
qsort              ext     stdlib.h
identifier       context    header     ISO        ANSI

raise              ext     signal.h
rand               ext     stdlib.h
RAND_MAX           H       stdlib.h   7.10       4.10
realloc            ext     stdlib.h
register           all     (keyword)  6.1.1      3.1.1
reinterpret_cast   C++ only
remove             ext     stdio.h
rename             ext     stdio.h
return             all     (keyword)  6.1.1      3.1.1
rewind             ext     stdio.h
identifier       context    header     ISO        ANSI

scanf              ext     stdio.h
SCHAR_MAX          H       limits.h
SCHAR_MIN          H       limits.h
SEEK_CUR           H       stdio.h    7.9.1      4.9.1
SEEK_END           H       stdio.h    7.9.1      4.9.1
SEEK_SET           H       stdio.h    7.9.1      4.9.1
setbuf             ext     stdio.h
setjmp             H       setjmp.h
setlocale          ext     locale.h
setvbuf            ext     stdio.h
short              all     (keyword)  6.1.1      3.1.1
SHRT_MAX           H       limits.h
SHRT_MIN           H       limits.h
SIG_[A-Z][any]     H       signal.h   7.7        4.7
sig_atomic_t(type) H       signal.h   7.7        4.7
SIG_DFL            H       signal.h   7.7        4.7
SIG_ERR            H       signal.h   7.7        4.7
SIG_IGN            H       signal.h   7.7        4.7
SIG[A-Z][any]      H       signal.h   7.7        4.7
SIGABRT            H       signal.h   7.7        4.7
SIGFPE             H       signal.h   7.7        4.7
SIGILL             H       signal.h   7.7        4.7
SIGINT             H       signal.h   7.7        4.7
signal             ext     signal.h
signed             all     (keyword)  6.1.1      3.1.1
SIGSEGV            H       signal.h   7.7        4.7
SIGTERM            H       signal.h   7.7        4.7
sin                ext     math.h
sinf               ext     (future)   7.13.4     4.13.4
sinh               ext     math.h
sinhf, sinhl       ext     (future)   7.13.4     4.13.4
sinl               ext     (future)   7.13.4     4.13.4
size_t (type)      ext     many       many
sizeof             all     (keyword)  6.1.1      3.1.1
sprintf            ext     stdio.h
sqrt               ext     math.h
sqrtf, sqrtl       ext     (future)   7.13.4     4.13.4
srand              ext     stdlib.h
sscanf             ext     stdio.h
static             all     (keyword)  6.1.1      3.1.1
static_cast        C++ only
stderr             H       stdio.h    7.9.1      4.9.1
stdin              H       stdio.h    7.9.1      4.9.1
stdout             H       stdio.h    7.9.1      4.9.1
str[a-z][any]      ext     (future)   7.13.7     4.13.7
str[a-z][any]      ext     (future)   7.13.8     4.13.8
strcat             ext     string.h
strchr             ext     string.h
strcmp             ext     string.h
strcoll            ext     string.h
strcpy             ext     string.h
strcspn            ext     string.h
strerror           ext     string.h
strftime           ext     time.h
strlen             ext     string.h
strncat            ext     string.h
strncmp            ext     string.h
strncpy            ext     string.h
strpbrk            ext     string.h
strrchr            ext     string.h
strspn             ext     string.h
strstr             ext     string.h
strtod             ext     stdlib.h
strtok             ext     string.h
strtol             ext     stdlib.h
strtoul            ext     stdlib.h
struct             all     (keyword)  6.1.1      3.1.1
strxfrm            ext     string.h
switch             all     (keyword)  6.1.1      3.1.1
swprintf           extW    wchar.h    NA1
swscanf            extW    wchar.h    NA1
system             ext     stdlib.h
identifier       context    header     ISO        ANSI

tan                ext     math.h
tanf               ext     (future)   7.13.4     4.13.4
tanh               ext     math.h
tanhf, tanhl       ext     (future)   7.13.4     4.13.4
tanl               ext     (future)   7.13.4     4.13.4
template           C++ only
this               C++ only
thousands_sep      Hmem    locale.h   7.4        4.4
throw              C++ only
time               ext     time.h
time_t (type)      H       time.h     7.12.1     4.12.1
tm (struct)        Htag    time.h     7.12.1     4.12.1
tm (struct)        Htag    wchar.h    NA1
tm_hour            Hmem    time.h     7.12.1     4.12.1
tm_isdst           Hmem    time.h     7.12.1     4.12.1
tm_mday            Hmem    time.h     7.12.1     4.12.1
tm_min             Hmem    time.h     7.12.1     4.12.1
tm_mon             Hmem    time.h     7.12.1     4.12.1
tm_sec             Hmem    time.h     7.12.1     4.12.1
tm_wday            Hmem    time.h     7.12.1     4.12.1
tm_yday            Hmem    time.h     7.12.1     4.12.1
tm_year            Hmem    time.h     7.12.1     4.12.1
TMP_MAX            H       stdio.h    7.9.1      4.9.1
tmpfile            ext     stdio.h
tmpnam             ext     stdio.h
to[a-z][any]       ext     (future)   7.13.2     4.13.2
tolower            ext     ctype.h
toupper            ext     ctype.h
towctrans          extW    wctype.h   NA1
towlower           extW    wctype.h   NA1
towupper           extW    wctype.h   NA1
true               C++ only
try                C++ only
typedef            all     (keyword)  6.1.1      3.1.1
typeid             C++ only
typename           C++ only
identifier       context    header     ISO        ANSI

UCHAR_MAX          H       limits.h
UINT_MAX           H       limits.h
ULONG_MAX          H       limits.h
ungetc             ext     stdio.h
ungetwc            extW    wchar.h    NA1
union              all     (keyword)  6.1.1      3.1.1
unsigned           all     (keyword)  6.1.1      3.1.1
USHRT_MAX          H       limits.h
using              C++ only
identifier       context    header     ISO        ANSI

va_arg             H       stdarg.h   7.8.1      4.8.1
va_end             H       stdarg.h   7.8.1      4.8.1
va_list (type)     H       stdarg.h   7.8        4.8
va_start           H       stdarg.h   7.8.1      4.8.1
vfprintf           ext     stdio.h
vfwprintf          extW    wchar.h    NA1
virtual            C++ only
void               all     (keyword)  6.1.1      3.1.1
volatile           all     (keyword)  6.1.1      3.1.1
vprintf            ext     stdio.h
vsprintf           ext     stdio.h
vswprintf          extW    wchar.h    NA1
vwprintf           extW    wchar.h    NA1
identifier       context    header     ISO        ANSI

WCHAR_MAX          H       wchar.h    NA1
WCHAR_MIN          H       wchar.h    NA1
wchar_t (type)     H/C++   stddef.h   7.1.6      4.1.5
wchar_t (type)     H/C++   stdlib.h   7.10       4.10
wchar_t (type)     H/C++   wchar.h    NA1
wcrtomb            extW    wchar.h    NA1
wcs[a-z][any]      ext     (future)   7.13.8     4.13.8
wcs[a-z][any]      extW    wchar.h    NA1
wcscat             extW    wchar.h    NA1
wcschr             extW    wchar.h    NA1
wcscmp             extW    wchar.h    NA1
wcscoll            extW    wchar.h    NA1
wcscpy             extW    wchar.h    NA1
wcscspn            extW    wchar.h    NA1
wcsftime           extW    wchar.h    NA1
wcslen             extW    wchar.h    NA1
wcsncat            extW    wchar.h    NA1
wcsncmp            extW    wchar.h    NA1
wcsncpy            extW    wchar.h    NA1
wcspbrk            extW    wchar.h    NA1
wcsrchr            extW    wchar.h    NA1
wcsrtombs          extW    wchar.h    NA1
wcsspn             extW    wchar.h    NA1
wcsstr             extW    wchar.h    NA1
wcstod             extW    wchar.h    NA1
wcstok             extW    wchar.h    NA1
wcstol             extW    wchar.h    NA1
wcstombs           ext     stdlib.h
wcstoul            extW    wchar.h    NA1
wcsxfrm            extW    wchar.h    NA1
wctob              extW    wchar.h    NA1
wctomb             ext     stdlib.h
wctrans            extW    wctype.h   NA1
wctrans_t (type)   H       wctype.h   NA1
wctype             extW    wctype.h   NA1
wctype_t (type)    H       wctype.h   NA1
WEOF               H       wchar.h    NA1
WEOF               H       wctype.h   NA1
while              all     (keyword)  6.1.1      3.1.1
wint_t (type)      H       wchar.h    NA1
wint_t (type)      H       wctype.h   NA1
wmemchr            extW    wchar.h    NA1
wmemcmp            extW    wchar.h    NA1
wmemcpy            extW    wchar.h    NA1
wmemmove           extW    wchar.h    NA1
wmemset            extW    wchar.h    NA1
wprintf            extW    wchar.h    NA1
wscanf             extW    wchar.h    NA1
xor                H/C++   iso646.h   NA1
xor_eq             H/C++   iso646.h   NA1


The standard lists (7.1.3/ the categories of reserved identifiers, where "reserved" means, essentially, prohibited for use by the individual C programmer. Recall that "if a program declares or defines an identifier with the same name as an identifier reserved in that context .., the behavior is undefined" (emphasis added). The "context" combines the concepts of scope (, linkage (, and name space (

I've marked those contexts in the above table. The details follow, but remember that you don't have to be concerned with them: you'll be safe if you simply never use any of the above identifiers (or anything that starts with the same six characters in capitals or lower case) for your own purposes.

contents ]  [ site map ]


Mark Brader ( was kind enough to send me a copy of his May 1992 Usenet article on the conversion between ANSI section and ISO (sub)clause numbers. I am also indebted to him for pointing out that user-selected external names must not match reserved external names even in the first six characters, and for many other helpful hints.

Clive Feather's writeup on the Normative Addendum was invaluable; see Standards, above, for the URL.

My thanks to Steve Summit and Bruce Evans for suggesting improvements in the Usenet article through a couple of revision cycles in 1992. My thanks also to Jutta Degener for pointing out in 1997 the need to take account of name spaces, so that e.g. extern int grouping; is in fact quite legal.

Among our wonderful Net resources are the Swedish site, which preserved this article at <>, and the Alta Vista search engine at for finding it. I had mislaid my own copy, and thus was happy to recover it in December 1996. (If you haven't searched Alta Vista for your own name, you might find the results enlightening.)

contents ]  [ site map ]

What's New

this page:

Was this page useful? Visit my other Technical Articles.