Riepilogo di dichiarazioni

declaration:
declaration-specifiers attribute-seq opt init-declarator-listopt;

/* attribute-seq è specifico di Microsoft */

declaration-specifiers:
storage-class-specifier declaration-specifiersopt

type-specifier declaration-specifiersopt

type-qualifier declaration-specifiersopt

attribute-seq : /* attribute-seq è specifico di Microsoft */
attribute attribute-seq opt

attribute : uno tra /* Specifico di Microsoft */

__asm __clrcall __stdcall
__based __fastcall __thiscall
__cdecl __inline __vectorcall

init-declarator-list:
init-declarator

init-declarator-list , init-declarator

init-declarator:
declarator

declarator = initializer /* Per inizializzazione scalare */

storage-class-specifier:
auto

register

static

extern

typedef

__declspec ( extended-decl-modifier-seq ) /* Specifico di Microsoft */

type-specifier:
void

char

short

int

__int8 /* Specifico di Microsoft */

__int16 /* Specifico di Microsoft */

__int32 /* Specifico di Microsoft */

__int64 /* Specifico di Microsoft */

long

float

double

signed

unsigned

struct-or-union-specifier

enum-specifier

typedef-name

type-qualifier:
const

volatile

declarator:
pointeropt direct-declarator

direct-declarator:
identifier

( declarator )

direct-declarator [ constant-expression opt]

direct-declarator ( parameter-type-list ) /* Dichiaratore nuovo stile */

direct-declarator ( identifier-listopt) /* Dichiaratore stile obsoleto */

pointer:
\* type-qualifier-listopt

\* type-qualifier-listoptpointer

parameter-type-list: /* Elenco parametri */
parameter-list

parameter-list , ...

parameter-list:
parameter-declaration

parameter-list , parameter-declaration

type-qualifier-list:
type-qualifier

type-qualifier-list type-qualifier

enum-specifier:
enum identifieropt{ enumerator-list }

enum identifier

enumerator-list:
enumerator

enumerator-list , enumerator

enumerator:
enumeration-constant

enumeration-constant = constant-expression

enumeration-constant:
identifier

struct-or-union-specifier:
struct-or-union identifieropt{ 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 ;

specifier-qualifier-list:
type-specifier specifier-qualifier-listopt

type-qualifier specifier-qualifier-listopt

struct-declarator-list:
struct-declarator struct-declarator-list , struct-declarator

struct-declarator:
declarator

type-specifier declaratoropt: constant-expression

parameter-declaration:
declaration-specifiers declarator /* Dichiaratore denominato */

declaration-specifiers abstract-declaratoropt/\* Dichiaratore anonimo */

identifier-list: /\* Per dichiaratore stile precedente * /
identifier

identifier-list , identifier

abstract-declarator: /\* Usato con dichiaratori anonimi */
pointer

pointeroptdirect-abstract-declarator

direct-abstract-declarator:
( abstract-declarator )

direct-abstract-declaratoropt[ constant-expressionopt]

direct-abstract-declaratoropt( parameter-type-list opt)

initializer:
assignment-expression

{ initializer-list } /* Per inizializzazione aggregata */

{ initializer-list , }

initializer-list:
initializer

initializer-list , initializer

type-name:
specifier-qualifier-list abstract-declaratoropt

typedef-name:
identifier

extended-decl-modifier-seq:/* Specifico di Microsoft */
extended-decl-modifieropt

extended-decl-modifier-seq extended-decl-modifier

extended-decl-modifier: /* Specifico di Microsoft */
thread

naked

dllimport

dllexport

Vedere anche

Convenzioni di chiamata
Grammatica a struttura di frase
Convenzioni di chiamata obsolete