keyword

Applies to C Applies to C++

Purpose

This option controls whether the specified name is treated as a keyword or as an identifier whenever it appears in your program source.

Syntax


Syntax Diagram

Notes

By default all the built-in keywords defined in the C and C++ language standards are reserved as keywords. 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 all C++ built-in keywords.

This option can also be used with the following C built-in keywords:

Example

You can reinstate bool with the following invocation:

xlc++ -qkeyword=bool

Related References

Compiler Command Line Options IBM Copyright 2003