aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/parse.c
diff options
authorChristopher Li <sparse@chrisli.org>2017-07-03 04:18:31 -0700
committerChristopher Li <sparse@chrisli.org>2017-07-04 07:53:19 -0700
commitfeff6319efa07b81fe30cf09dc3e53cc69813791 (patch)
tree53d29acd9c2db026e0cca7ea70f456d2c5dc95c1 /parse.c
parent8ae29ee0451a801900e5c516a5af4046506fd0f7 (diff)
downloadsparse-dev-feff6319efa07b81fe30cf09dc3e53cc69813791.tar.gz
Add full list of gcc attribute
This will greatly reduce the "unknown attribute" warning. Signed-off-By: Christopher Li <sparse@chrisli.org>
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c114
1 files changed, 10 insertions, 104 deletions
diff --git a/parse.c b/parse.c
index 953d04bc..02a55a74 100644
--- a/parse.c
+++ b/parse.c
@@ -540,116 +540,22 @@ static struct init_keyword {
{ "__word__", NS_KEYWORD, MOD_LONG, .op = &mode_word_op },
};
+
static const char *ignored_attributes[] = {
- "alias",
- "__alias__",
- "alloc_align",
- "__alloc_align__",
- "alloc_size",
- "__alloc_size__",
- "always_inline",
- "__always_inline__",
- "artificial",
- "__artificial__",
- "assume_aligned",
- "__assume_aligned__",
+
+#define GCC_ATTR(x) \
+ STRINGIFY(x), \
+ STRINGIFY(__##x##__),
+
+#include "gcc-attr-list.h"
+
+#undef GCC_ATTR
+
"bounded",
"__bounded__",
- "cdecl",
- "__cdecl__",
- "cold",
- "__cold__",
- "constructor",
- "__constructor__",
- "deprecated",
- "__deprecated__",
- "destructor",
- "__destructor__",
- "dllexport",
- "__dllexport__",
- "dllimport",
- "__dllimport__",
- "error",
- "__error__",
- "externally_visible",
- "__externally_visible__",
- "fastcall",
- "__fastcall__",
- "format",
- "__format__",
- "format_arg",
- "__format_arg__",
- "gnu_inline",
- "__gnu_inline__",
- "hot",
- "__hot__",
- "hotpatch",
- "__hotpatch__",
- "leaf",
- "__leaf__",
- "l1_text",
- "__l1_text__",
- "l1_data",
- "__l1_data__",
- "l2",
- "__l2__",
- "malloc",
- "__malloc__",
- "may_alias",
- "__may_alias__",
- "model",
- "__model__",
- "ms_abi",
- "__ms_abi__",
- "ms_hook_prologue",
- "__ms_hook_prologue__",
- "naked",
- "__naked__",
- "no_instrument_function",
- "__no_instrument_function__",
- "no_sanitize_address",
- "__no_sanitize_address__",
- "noclone",
"__noclone",
- "__noclone__",
- "noinline",
- "__noinline__",
- "nonnull",
"__nonnull",
- "__nonnull__",
- "nothrow",
"__nothrow",
- "__nothrow__",
- "optimize",
- "__optimize__",
- "regparm",
- "__regparm__",
- "section",
- "__section__",
- "sentinel",
- "__sentinel__",
- "signal",
- "__signal__",
- "stdcall",
- "__stdcall__",
- "syscall_linkage",
- "__syscall_linkage__",
- "sysv_abi",
- "__sysv_abi__",
- "unused",
- "__unused__",
- "used",
- "__used__",
- "vector_size",
- "__vector_size__",
- "visibility",
- "__visibility__",
- "warn_unused_result",
- "__warn_unused_result__",
- "warning",
- "__warning__",
- "weak",
- "__weak__",
};