diff options
author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-06-18 21:42:48 +0200 |
---|---|---|
committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-06-18 21:42:48 +0200 |
commit | 31f0c22032d295f6a0cd1e068b9a9d53be8adcbf (patch) | |
tree | 3116ed3289d46b16d9234957cb38bc778e796037 | |
parent | c17b1b06c00f23339ea3c5e17d19fac38115520f (diff) | |
parent | 9cd32cbde900238795ad80c5e3c0adb5975c8f2e (diff) | |
download | sparse-31f0c22032d295f6a0cd1e068b9a9d53be8adcbf.tar.gz |
Merge branch 'misc'
-rw-r--r-- | Documentation/TODO.md | 5 | ||||
-rw-r--r-- | Documentation/types.rst | 22 | ||||
-rw-r--r-- | Makefile | 3 | ||||
-rwxr-xr-x | validation/test-suite | 2 |
4 files changed, 16 insertions, 16 deletions
diff --git a/Documentation/TODO.md b/Documentation/TODO.md index 4344a1dc..e2043e48 100644 --- a/Documentation/TODO.md +++ b/Documentation/TODO.md @@ -34,7 +34,6 @@ Misc ---- * GCC's -Wenum-compare / clangs's -Wenum-conversion -Wassign-enum * parse __attribute_((fallthrough)) -* add support for __builtin_unreachable() * add support for format(printf()) (WIP by Ben Dooks) * make use of UNDEFs (issues warnings, simplification, ... ?) * add a pass to inline small functions during simplification. @@ -85,8 +84,8 @@ Longer term/to investigate "warning: Variable length array is used. (-Wno-vla)" -* ptrlists must have elements be removed while being iterated but this - is hard to insure it is not done. +* ptrlists must not have elements removed while being iterated; + this should somehow be enforced. * having 'struct symbol' used to represent symbols *and* types is quite handy but it also creates lots of problems and complications * Possible mixup of symbol for a function designator being not a pointer? diff --git a/Documentation/types.rst b/Documentation/types.rst index e5d07def..272f32a0 100644 --- a/Documentation/types.rst +++ b/Documentation/types.rst @@ -13,7 +13,7 @@ For the purpose of this document, things can be simplified into: struct ctype { struct symbol *base_type; unsigned long modifiers; - unsigned long alignement; + unsigned long alignment; struct context_list *contexts; struct indent *as; }; @@ -30,16 +30,16 @@ Some bits, also related to the type, are in struct symbol itself: * accessed * transparent_union -* ```base_type``` is used for the associated base type. -* ```modifiers``` is a bit mask for type specifiers (MOD_UNSIGNED, ...), +* ``base_type`` is used for the associated base type. +* ``modifiers`` is a bit mask for type specifiers (MOD_UNSIGNED, ...), type qualifiers (MOD_CONST, MOD_VOLATILE), storage classes (MOD_STATIC, MOD_EXTERN, ...), as well for various attributes. It's also used internally to keep track of some states (MOD_ACCESS or MOD_ADDRESSABLE). -* ```alignment``` is used for the alignment, in bytes. -* ```contexts``` is used to store the informations associated with the - attribute ```context()```. -* ```as``` is used to hold the identifier of the attribute ```address_space()```. +* ``alignment`` is used for the alignment, in bytes. +* ``contexts`` is used to store the informations associated with the + attribute ``context()``. +* ``as`` is used to hold the identifier of the attribute ``address_space()``. Kind of types ============= @@ -49,11 +49,11 @@ SYM_BASETYPE Used by integer, floating-point, void, 'type', 'incomplete' & bad types. For integer types: - * .ctype.base_type points to ```int_ctype```, the generic/abstract integer type + * .ctype.base_type points to ``int_ctype``, the generic/abstract integer type * .ctype.modifiers has MOD_UNSIGNED/SIGNED/EXPLICITLY_SIGNED set accordingly. For floating-point types: - * .ctype.base_type points to ```fp_ctype```, the generic/abstract float type + * .ctype.base_type points to ``fp_ctype``, the generic/abstract float type * .ctype.modifiers is zero. For the other base types: @@ -68,7 +68,7 @@ have their own modifiers, address_space, contexts or alignment as well as the declaration's identifier. Usage: - * .ctype.base_type points to the unmodified type (wich must not + * .ctype.base_type points to the unmodified type (which must not be a SYM_NODE itself) * .ctype.modifiers, .as, .alignment, .contexts will contains the 'variation' (MOD_CONST, the attributes, ...). @@ -131,7 +131,7 @@ Used for bitwise types (aka 'restricted' types): SYM_FOULED ---------- Used for bitwise types when the negation op (~) is -used and the bit_size is smaller than an ```int```. +used and the bit_size is smaller than an ``int``. There is a 1-to-1 mapping between a fouled type and its parent bitwise type. @@ -6,6 +6,7 @@ OS = linux CC = gcc +CXX = g++ LD = $(CC) AR = ar @@ -196,7 +197,7 @@ LLVM_VERSION:=$(shell $(LLVM_CONFIG) --version) LLVM_VERSION_MAJOR:=$(firstword $(subst ., ,$(LLVM_VERSION))) ifeq ($(shell expr "$(LLVM_VERSION_MAJOR)" '>=' 3),1) LLVM_PROGS := sparse-llvm -$(LLVM_PROGS): LD := g++ +$(LLVM_PROGS): LD := $(CXX) LLVM_LDFLAGS := $(shell $(LLVM_CONFIG) --ldflags) LLVM_CFLAGS := $(shell $(LLVM_CONFIG) --cppflags) LLVM_LIBS := $(shell $(LLVM_CONFIG) --libs) diff --git a/validation/test-suite b/validation/test-suite index 64a3e08f..a22f7013 100755 --- a/validation/test-suite +++ b/validation/test-suite @@ -338,7 +338,7 @@ do_test() # do we want a timeout? pre_cmd="" if [ $check_timeout -ne 0 ]; then - pre_cmd="timeout -k 1s $check_timeout" + pre_cmd="timeout $check_timeout" fi shift |