aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-06-28 15:09:59 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-07-14 00:06:10 +0200
commit7f4170c8d5dc20aa930f0195fd64aca79fe40a16 (patch)
treeaa1a6eb87d4828a35e2b3c3d3ebad357a337a54d
parent99bcbcaf803f894fafc90d22ab4fc5db73a3016e (diff)
downloadsparse-7f4170c8d5dc20aa930f0195fd64aca79fe40a16.tar.gz
predefine: teach sparse about __SIG_ATOMIC_TYPE__
This type is predefined by GCC so add it to sparse too. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r--predefine.c1
-rw-r--r--target.c1
-rw-r--r--target.h1
3 files changed, 3 insertions, 0 deletions
diff --git a/predefine.c b/predefine.c
index 2e9913d5..60ecc707 100644
--- a/predefine.c
+++ b/predefine.c
@@ -170,6 +170,7 @@ void predefined_macros(void)
predefined_ctype("PTRDIFF", ssize_t_ctype, PTYPE_ALL_T|PTYPE_TYPE);
predefined_ctype("SIZE", size_t_ctype, PTYPE_ALL_T|PTYPE_TYPE);
predefined_ctype("POINTER", &ptr_ctype, PTYPE_SIZEOF);
+ predefined_ctype("SIG_ATOMIC", sig_atomic_ctype, PTYPE_MAX|PTYPE_MIN|PTYPE_TYPE|PTYPE_WIDTH);
predefined_sizeof("FLOAT", "", bits_in_float);
predefined_sizeof("DOUBLE", "", bits_in_double);
diff --git a/target.c b/target.c
index 655a1527..f320ab52 100644
--- a/target.c
+++ b/target.c
@@ -31,6 +31,7 @@ struct symbol *fast32_ctype = &long_ctype;
struct symbol *ufast32_ctype = &ulong_ctype;
struct symbol *fast64_ctype = &long_ctype;
struct symbol *ufast64_ctype = &ulong_ctype;
+struct symbol *sig_atomic_ctype = &int_ctype;
/*
* For "__attribute__((aligned))"
diff --git a/target.h b/target.h
index 3fdfc1e6..5bbce397 100644
--- a/target.h
+++ b/target.h
@@ -29,6 +29,7 @@ extern struct symbol *fast32_ctype;
extern struct symbol *ufast32_ctype;
extern struct symbol *fast64_ctype;
extern struct symbol *ufast64_ctype;
+extern struct symbol *sig_atomic_ctype;
/*
* For "__attribute__((aligned))"