diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 2017-02-06 16:53:12 +0100 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 2017-02-06 16:53:12 +0100 |
commit | 8ace28abf0c70ebdc423baea9ae0e8c68e0b60ed (patch) | |
tree | 43e89a45ed321081cbcaaac06165a7e62b84a34b /cparser/GCC.ml | |
parent | 9d4bb7ec914566b3920cca3c6823515448fb65c1 (diff) | |
parent | 4afaf8c23274752c8a6067bd785e114578068702 (diff) | |
download | compcert-8ace28abf0c70ebdc423baea9ae0e8c68e0b60ed.tar.gz compcert-8ace28abf0c70ebdc423baea9ae0e8c68e0b60ed.zip |
Merge branch 'elaboration-of-attributes'
Diffstat (limited to 'cparser/GCC.ml')
-rw-r--r-- | cparser/GCC.ml | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/cparser/GCC.ml b/cparser/GCC.ml index f7f64a4e..010d12f3 100644 --- a/cparser/GCC.ml +++ b/cparser/GCC.ml @@ -13,7 +13,7 @@ (* *) (* *********************************************************************) -(* GCC built-ins *) +(* GCC built-ins and attributes *) open C open Cutil @@ -221,3 +221,25 @@ let builtins = { "__builtin_va_copy", (voidType, [ voidPtrType; voidPtrType ], false) ] } + +let attributes = [ (* a subset of those of GCC 5 *) + (* type-related *) + ("aligned", Attr_type); ("may_alias", Attr_type); ("visibility", Attr_type); + (* struct-related *) + ("packed", Attr_struct); ("designated_init", Attr_struct); + (* function-related *) + ("cdecl", Attr_function); ("stdcall", Attr_function); + ("fastcall", Attr_function); ("thiscall", Attr_function); + ("const", Attr_function); ("noreturn", Attr_name); + (* name-related *) + ("cleanup", Attr_name); ("common", Attr_name); ("nocommon", Attr_name); + ("deprecated", Attr_name); ("section", Attr_name); + ("shared", Attr_name); ("tls_model", Attr_name); ("unused", Attr_name); + ("used", Attr_name); ("weak", Attr_name); + ("dllimport", Attr_name); ("dllexport", Attr_name); + ("alway_inline", Attr_name); ("gnu_inline", Attr_name); + ("artificial", Attr_name); ("flatten", Attr_name); + ("error", Attr_name); ("warning", Attr_name); + ("constructor", Attr_name); ("destructor", Attr_name); + ("externally_visible", Attr_name); ("interrupt", Attr_name) +] |