diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2017-02-16 13:23:17 +0100 |
---|---|---|
committer | Bernhard Schommer <bschommer@users.noreply.github.com> | 2017-02-17 14:09:56 +0100 |
commit | aa59d2dd11570e8cea3d8c429b94acf1001e2cc6 (patch) | |
tree | 80f80d7eabc0778f2a94a64a5ae5beba6233e2ee /cfrontend | |
parent | 6eb08ac1a681ac06c8b37a7c402e17bf12b82707 (diff) | |
download | compcert-aa59d2dd11570e8cea3d8c429b94acf1001e2cc6.tar.gz compcert-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.ml | 3 |
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) ] |