Podsumowanie deklaracji
declaration
:
declaration-specifiers
zrezygnuj1 init-declarator-list
attribute-seq
;
static_assert-declaration
declaration-specifiers
:
storage-class-specifier
declaration-specifiers
Zdecydować
type-specifier
declaration-specifiers
Zdecydować
type-qualifier
declaration-specifiers
Zdecydować
function-specifier
declaration-specifiers
Zdecydować
alignment-specifier
declaration-specifiers
Zdecydować
attribute-seq
1.
attribute
1 attribute-seq
zrezygnuj 1
attribute
1, 2: jeden z
__asm
__based
__cdecl
__clrcall
__fastcall
__inline
__stdcall
__thiscall
__vectorcall
init-declarator-list
:
init-declarator
init-declarator-list
,
init-declarator
init-declarator
:
declarator
declarator
=
initializer
storage-class-specifier
:
auto
extern
register
static
_Thread_local
typedef
__declspec
(
extended-decl-modifier-seq
)
1
extended-decl-modifier-seq
1.
extended-decl-modifier
Zdecydować
extended-decl-modifier-seq
extended-decl-modifier
extended-decl-modifier
1.
thread
naked
dllimport
dllexport
type-specifier
:
void
char
short
int
__int8
1
__int16
1
__int32
1
__int64
1
long
float
double
signed
unsigned
_Bool
_Complex
atomic-type-specifier
struct-or-union-specifier
enum-specifier
typedef-name
struct-or-union-specifier
:
struct-or-union
identifier
Zdecydować {
struct-declaration-list
}
struct-or-union
identifier
struct-or-union
:
struct
union
struct-declaration-list
:
struct-declaration
struct-declaration-list
struct-declaration
struct-declaration
:
specifier-qualifier-list
struct-declarator-list
Zdecydować ;
static_assert-declaration
specifier-qualifier-list
:
type-specifier
specifier-qualifier-list
Zdecydować
type-qualifier
specifier-qualifier-list
Zdecydować
alignment-specifier
specifier-qualifier-list
Zdecydować
struct-declarator-list
:
struct-declarator
struct-declarator-list
,
struct-declarator
struct-declarator
:
declarator
declarator
Zdecydować :
constant-expression
enum-specifier
:
enum
identifier
Zdecydować {
enumerator-list
}
enum
identifier
Zdecydować {
enumerator-list
,
}
enum
identifier
enumerator-list
:
enumerator
enumerator-list
,
enumerator
enumerator
:
enumeration-constant
enumeration-constant
=
constant-expression
atomic-type-specifier
:
_Atomic
(
type-name
)
type-qualifier
:
const
restrict
volatile
_Atomic
function-specifier
:
inline
_Noreturn
alignment-specifier
:
_Alignas
(
type-name
)
_Alignas
(
constant-expression
)
declarator
:
pointer
Zdecydować direct-declarator
direct-declarator
:
identifier
(
declarator
)
direct-declarator
[
type-qualifier-list
opt opt opt assignment-expression
]
direct-declarator
[
static
type-qualifier-list
Zdecydować assignment-expression
]
direct-declarator
[
type-qualifier-list
static
assignment-expression
]
direct-declarator
[
type-qualifier-list
Zdecydować *
]
direct-declarator
(
parameter-type-list
)
direct-declarator
(
identifier-list
opt )
3
pointer
:
*
type-qualifier-list
Zdecydować
*
type-qualifier-list
Zdecydować pointer
type-qualifier-list
:
type-qualifier
type-qualifier-list
type-qualifier
parameter-type-list
:
parameter-list
parameter-list
,
...
parameter-list
:
parameter-declaration
parameter-list
,
parameter-declaration
parameter-declaration
:
declaration-specifiers
declarator
declaration-specifiers
abstract-declarator
Zdecydować
identifier-list
: /* Dla deklaratora starego stylu */
identifier
identifier-list
,
identifier
type-name
:
specifier-qualifier-list
abstract-declarator
Zdecydować
abstract-declarator
:
pointer
pointer
Zdecydować direct-abstract-declarator
direct-abstract-declarator
:
(
abstract-declarator
)
direct-abstract-declarator
[
type-qualifier-list
opt opt opt assignment-expression
]
direct-abstract-declarator
[
static
type-qualifier-list
Zdecydować assignment-expression
]
direct-abstract-declarator
[
type-qualifier-list
static
assignment-expression
]
direct-abstract-declarator
[
type-qualifier-list
Zdecydować *
]
direct-abstract-declarator
opt opt opt (
parameter-type-list
)
typedef-name
:
identifier
initializer
:
assignment-expression
{
initializer-list
}
{
initializer-list
, }
initializer-list
:
designation
Zdecydować initializer
initializer-list
,
designation
Zdecydować initializer
designation
:
designator-list
=
designator-list
:
designator
designator-list
designator
designator
:
[
constant-expression
]
.
identifier
static_assert-declaration
:
_Static_assert
(
constant-expression
,
string-literal
)
;
1 Ten element gramatyki jest specyficzny dla firmy Microsoft.
2 Aby uzyskać więcej informacji na temat tych elementów, zobacz __asm
, , __stdcall
__clrcall
, __fastcall
__inline
__thiscall
__based
__cdecl
i .__vectorcall
3 Ten styl jest przestarzały.
Zobacz też
Konwencje wywoływania
Gramatyka struktury fraz
Przestarzałe konwencje wywoływania