Purpose
Controls whether the specified name is treated
as a keyword or as an identifier whenever it appears in your program
source.
Syntax
.-keyword---.
>>- -q--+-nokeyword-+--=--keyword_name-------------------------><
Defaults
By default, all the built-in keywords
defined in the C language standard are reserved as keywords.
Usage
You cannot add keywords to the language with this option.
However, you can use -qnokeyword=keyword_name to
disable built-in keywords, and use -qkeyword=keyword_name to
reinstate those keywords.
This option can be
used with the following C keywords:
- asm
- inline
- restrict
- typeof
Note: asm is not reserved as a keyword at
the stdc89 or stdc99 language level.
Predefined macros
- __C99_INLINE is defined to 1 when -qkeyword=inline is
in effect.
- __C99_RESTRICT is defined to 1 when -qkeyword=restrict is
in effect.
- __IBM_GCC_ASM is defined to 1 when -qkeyword=asm is
in effect.
- __IBM__TYPEOF__ is defined to 1 when -qkeyword=typeof is
in effect.
Examples
You can reinstate
typeof with the following
invocation:
xlc -qkeyword=typeof