선언 요약Summary of Declarations

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

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

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

type-specifier declaration-specifiersopttype-specifier declaration-specifiersopt

type-qualifier declaration-specifiersopttype-qualifier declaration-specifiersopt

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

attribute : 다음 중 하나 /* Microsoft 전용 */attribute : one of /* Microsoft Specific */

__asm__asm __clrcall__clrcall __stdcall__stdcall
__based__based __fastcall__fastcall __thiscall__thiscall
__cdecl__cdecl __inline__inline __vectorcall__vectorcall

init-declarator-list:init-declarator-list:
init-declaratorinit-declarator

init-declarator-list , init-declaratorinit-declarator-list , init-declarator

init-declarator:init-declarator:
declaratordeclarator

declarator = initializer /* 스칼라 초기화용 */declarator = initializer /* For scalar initialization */

storage-class-specifier:storage-class-specifier:
autoauto

registerregister

staticstatic

externextern

typedeftypedef

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

type-specifier:type-specifier:
voidvoid

charchar

shortshort

intint

__int8 /* Microsoft 전용 */__int8 /* Microsoft Specific */

__int16 /* Microsoft 전용 */__int16 /* Microsoft Specific */

__int32 /* Microsoft 전용 */__int32 /* Microsoft Specific */

__int64 /* Microsoft 전용 */__int64 /* Microsoft Specific */

longlong

floatfloat

doubledouble

signedsigned

unsignedunsigned

struct-or-union-specifierstruct-or-union-specifier

enum-specifierenum-specifier

typedef-nametypedef-name

type-qualifier:type-qualifier:
constconst

volatile

declarator:declarator:
pointeropt direct-declaratorpointeropt direct-declarator

direct-declarator:direct-declarator:
identifieridentifier

( declarator )( declarator )

direct-declarator [ constant-expression opt]direct-declarator [ constant-expression opt]

direct-declarator ( parameter-type-list ) /* 새로운 스타일의 선언자 */direct-declarator ( parameter-type-list ) /* New-style declarator */

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

pointer:pointer:
\* type-qualifier-listopt\* type-qualifier-listopt

\* type-qualifier-listoptpointer\* type-qualifier-listoptpointer

parameter-type-list: /* 매개 변수 목록 */parameter-type-list: /* The parameter list */
parameter-listparameter-list

parameter-list , ...parameter-list , ...

parameter-list:parameter-list:
parameter-declarationparameter-declaration

parameter-list , parameter-declarationparameter-list , parameter-declaration

type-qualifier-list:type-qualifier-list:
type-qualifiertype-qualifier

type-qualifier-list type-qualifiertype-qualifier-list type-qualifier

enum-specifier:enum-specifier:
enum identifieropt{ enumerator-list }enum identifieropt{ enumerator-list }

enum identifierenum identifier

enumerator-list:enumerator-list:
enumeratorenumerator

enumerator-list , enumeratorenumerator-list , enumerator

enumerator:enumerator:
enumeration-constantenumeration-constant

enumeration-constant = constant-expressionenumeration-constant = constant-expression

enumeration-constant:enumeration-constant:
identifieridentifier

struct-or-union-specifier:struct-or-union-specifier:
struct-or-union identifieropt{ struct-declaration-list } struct-or-union identifierstruct-or-union identifieropt{ struct-declaration-list } struct-or-union identifier

struct-or-union:struct-or-union:
tructstruct

unionunion

struct-declaration-list:struct-declaration-list:
struct-declarationstruct-declaration

struct-declaration-list struct-declarationstruct-declaration-list struct-declaration

struct-declaration:struct-declaration:
specifier-qualifier-list struct-declarator-list ;specifier-qualifier-list struct-declarator-list ;

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

type-qualifier specifier-qualifier-listopttype-qualifier specifier-qualifier-listopt

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

struct-declarator:struct-declarator:
declaratordeclarator

type-specifier declaratoropt: constant-expressiontype-specifier declaratoropt: constant-expression

parameter-declaration:parameter-declaration:
declaration-specifiers declarator /* 명명된 선언자 */declaration-specifiers declarator /* Named declarator */

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

identifier-list: /\* 이전 스타일의 선언자용 * /identifier-list: /\* For old-style declarator * /
identifieridentifier

identifier-list , identifieridentifier-list , identifier

abstract-declarator: /\* 익명 선언자와 함께 사용됨 */abstract-declarator: /\* Used with anonymous declarators */
pointerpointer

pointeroptdirect-abstract-declaratorpointeroptdirect-abstract-declarator

direct-abstract-declarator:direct-abstract-declarator:
( abstract-declarator )( abstract-declarator )

direct-abstract-declaratoropt[ constant-expressionopt]direct-abstract-declaratoropt[ constant-expressionopt]

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

initializer:initializer:
assignment-expressionassignment-expression

{ initializer-list } /* 집합체 초기화용 */{ initializer-list } /* For aggregate initialization */

{ initializer-list , }{ initializer-list , }

initializer-list:initializer-list:
initializerinitializer

initializer-list , initializerinitializer-list , initializer

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

typedef-name:typedef-name:
identifieridentifier

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

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

extended-decl-modifier: /* Microsoft 전용 */extended-decl-modifier: /* Microsoft Specific */
threadthread

nakednaked

dllimportdllimport

dllexport

참고 항목See Also

호출 규칙 Calling Conventions
구 구조 문법 Phrase Structure Grammar
사용되지 않는 호출 규칙Obsolete Calling Conventions