ILE C/C++ Language Reference

Keywords

Keywords are identifiers reserved by the language for special use. Although you can use them for preprocessor macro names, it is considered poor programming style. Only the exact spelling of keywords is reserved. For example, auto is reserved but AUTO is not.

Table 3. C and C++ keywords
auto
break
case
char
const
continue
default
do
double
else
enum
extern
float
for
goto
if
int
long
register
return
short
signed
sizeof
static
struct
switch
typedef
union
unsigned
void
volatile
while
C++ only

The C++ language also reserves the following keywords:

Table 4. C++ keywords
asm
bool
catch
class
const_cast
delete
dynamic_cast
explicit
export
false
friend
inline
mutable
namespace
new
operator
private
protected
public
reinterpret_cast
static_cast
template
this
throw
true
try
typeid
typename
using
virtual
wchar_t
End of C++ only
IBM extension

Keywords for language extensions

In addition to standard language keywords, ILE C/C++ reserves the following keywords for use in language extensions and for future use:

Table 5. Keywords for C and C++ language extensions
__alignof
__alignof__
__attribute__
__attribute
__const__
_Decimal321
_Decimal641
_Decimal1281
__extension__
__label__
__inline__
__restrict
__restrict__
__signed__
__signed
__volatile__
__thread 1
typeof
__typeof__
decimal
_Decimal
__align
_Packed
__ptr128
__ptr64
Notes:
  1. These keywords are recognized only when LANGLVL(*EXTENDED) is specified.
C++ only

ILE C++ reserves the following keywords as language extensions for compatibility with C99.

Table 6. Keywords for C++ language extensions related to C99
restrict
_Pragma
End of C++ only

More detailed information regarding the compilation contexts in which extension keywords are valid is provided in the sections of this document that describe each keyword.

End of IBM extension


[ Top of Page | Previous Page | Next Page | Contents | Index ]