From WikiChip
Difference between revisions of "c/reserved keywords"
m (→C11 changes from C99: added wikilinks) |
m |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | '''Reserved keywords''' in [[C]] are a set valid [[identifier]] names which are part of the grammar of C and therefore may not be used for anything but their intended purpose. That is, they may not be used as variable names, function names, or an any other type of identifiers. Just like all other identifier in [[C]], they are case sensitive. | + | {{c title|Reserved Keywords}}'''Reserved keywords''' in [[C]] are a set valid [[identifier]] names which are part of the grammar of C and therefore may not be used for anything but their intended purpose. That is, they may not be used as variable names, function names, or an any other type of identifiers. Just like all other identifier in [[C]], they are case sensitive. |
The table below lists all keywords reserved by the C language. | The table below lists all keywords reserved by the C language. | ||
Line 48: | Line 48: | ||
*_Complex<sup>1</sup> | *_Complex<sup>1</sup> | ||
| | | | ||
− | * | + | *{{C|_Generic}}<sup>2</sup> |
*_Imaginary<sup>1</sup> | *_Imaginary<sup>1</sup> | ||
*_Noreturn<sup>2</sup> | *_Noreturn<sup>2</sup> | ||
− | * | + | *{{C|_Static_assert}}<sup>2</sup> |
*_Thread_local<sup>2</sup> | *_Thread_local<sup>2</sup> | ||
|} | |} | ||
− | <sup>1</sup> - Keywords added in [[C99]]. | + | <sup>1</sup> - Keywords added in [[C99]]. <br /> |
<sup>2</sup> - Keywords added in [[C11]]. | <sup>2</sup> - Keywords added in [[C11]]. | ||
Line 73: | Line 73: | ||
* _Alignof | * _Alignof | ||
* _Atomic | * _Atomic | ||
− | * | + | * {{C|_Generic}} |
* _Noreturn | * _Noreturn | ||
− | * | + | * {{C|_Static_assert}} |
* _Thread_local | * _Thread_local | ||
[[Category:C programming language]] | [[Category:C programming language]] |
Latest revision as of 20:05, 7 January 2015
Reserved keywords in C are a set valid identifier names which are part of the grammar of C and therefore may not be used for anything but their intended purpose. That is, they may not be used as variable names, function names, or an any other type of identifiers. Just like all other identifier in C, they are case sensitive.
The table below lists all keywords reserved by the C language.
|
|
|
|
|
1 - Keywords added in C99.
2 - Keywords added in C11.
C99 changes from C89[edit]
C99 added the following keywords:
- inline
- restrict
- _Bool
- _Complex
- _Imaginary
C11 changes from C99[edit]
C11 added the following keywords:
- _Alignas
- _Alignof
- _Atomic
- _Generic
- _Noreturn
- _Static_assert
- _Thread_local