aboutsummaryrefslogtreecommitdiffstats
path: root/cfrontend
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2017-02-16 13:23:17 +0100
committerBernhard Schommer <bschommer@users.noreply.github.com>2017-02-17 14:09:56 +0100
commitaa59d2dd11570e8cea3d8c429b94acf1001e2cc6 (patch)
tree80f80d7eabc0778f2a94a64a5ae5beba6233e2ee /cfrontend
parent6eb08ac1a681ac06c8b37a7c402e17bf12b82707 (diff)
downloadcompcert-kvx-aa59d2dd11570e8cea3d8c429b94acf1001e2cc6.tar.gz
compcert-kvx-aa59d2dd11570e8cea3d8c429b94acf1001e2cc6.zip
Added unused attribute and simplified checks.
The attribute unused can be used to indicate if a variable or parameter is unused and no warning should be emitted for it. Furthermore this commit simplifies the check by adding a generic function to traverse the program. Bug 19872
Diffstat (limited to 'cfrontend')
-rw-r--r--cfrontend/C2C.ml3
1 files changed, 2 insertions, 1 deletions
diff --git a/cfrontend/C2C.ml b/cfrontend/C2C.ml
index 6a33c48d..eecda71b 100644
--- a/cfrontend/C2C.ml
+++ b/cfrontend/C2C.ml
@@ -272,7 +272,8 @@ let attributes = [
(* function-related *)
("noreturn", Cutil.Attr_function);
(* name-related *)
- ("section", Cutil.Attr_name)
+ ("section", Cutil.Attr_name);
+ ("unused", Cutil.Attr_name)
]