aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-05-24 21:27:13 -0700
committerMichael Forney <mforney@mforney.org>2019-05-24 21:27:13 -0700
commit3f7662d0e547156ae9318e8c75c5bee148a31e6c (patch)
tree9b009efb90895096238901136340db25ac8ddf8b
parent1ddeeb29e88cb7fe4ae7718aae1490ee14827142 (diff)
downloadcproc-3f7662d0e547156ae9318e8c75c5bee148a31e6c.tar.xz
Add __attribute__ keyword
This will be needed for weak references and hidden visibility.
-rw-r--r--cc.h1
-rw-r--r--pp.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/cc.h b/cc.h
index ce88f92..1f021fa 100644
--- a/cc.h
+++ b/cc.h
@@ -57,6 +57,7 @@ enum tokenkind {
T_STATIC_ASSERT,
T_THREAD_LOCAL,
T__ASM__,
+ T__ATTRIBUTE__,
T__TYPEOF__,
/* punctuator */
diff --git a/pp.c b/pp.c
index 25409d1..a694972 100644
--- a/pp.c
+++ b/pp.c
@@ -29,6 +29,7 @@ keyword(struct token *tok)
{"__alignof__", T_ALIGNOF},
{"__asm", T__ASM__},
{"__asm__", T__ASM__},
+ {"__attribute__", T__ATTRIBUTE__},
{"__inline", TINLINE},
{"__inline__", TINLINE},
{"__signed", TSIGNED},