선언 요약

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

/* attribute-seq는 Microsoft 전용임 */

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

type-specifier declaration-specifiersopt

type-qualifier declaration-specifiersopt

attribute-seq : /* attribute-seq는 Microsoft 전용임 */
attribute attribute-seq opt

attribute : 다음 중 하나 /* 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 /* 스칼라 초기화용 */

storage-class-specifier:
auto

register

static

extern

typedef

__declspec ( extended-decl-modifier-seq ) /* Microsoft 전용 */

type-specifier:
void

char

short

int

__int8 /* Microsoft 전용 */

__int16 /* Microsoft 전용 */

__int32 /* Microsoft 전용 */

__int64 /* 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 ) /* 새로운 스타일의 선언자 */

direct-declarator ( identifier-listopt) /* 사용되지 않는 스타일의 선언자 */

pointer:
\* type-qualifier-listopt

\* type-qualifier-listoptpointer

parameter-type-list: /* 매개 변수 목록 */
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:
truct

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 /* 명명된 선언자 */

declaration-specifiers abstract-declaratoropt/\* 익명 선언자 */

identifier-list: /\* 이전 스타일의 선언자용 * /
identifier

identifier-list , identifier

abstract-declarator: /\* 익명 선언자와 함께 사용됨 */
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 } /* 집합체 초기화용 */

{ initializer-list , }

initializer-list:
initializer

initializer-list , initializer

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

typedef-name:
identifier

extended-decl-modifier-seq:/* Microsoft 전용 */
extended-decl-modifieropt

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

extended-decl-modifier: /* Microsoft 전용 */
thread

naked

dllimport

dllexport

참고 항목

호출 규칙
구 구조 문법
사용되지 않는 호출 규칙