aboutsummaryrefslogtreecommitdiffstats
path: root/cparser/Cutil.ml
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2016-01-28 09:18:49 +0100
committerBernhard Schommer <bernhardschommer@gmail.com>2016-01-28 09:18:49 +0100
commit2fd25fea96ecb39d2792f463b60fb39594fc75be (patch)
tree1a1b9987c7e0dfdd3523ce432bdf6aeec676de5d /cparser/Cutil.ml
parent507f000343636e1e300b1f3af71177726926292c (diff)
downloadcompcert-kvx-2fd25fea96ecb39d2792f463b60fb39594fc75be.tar.gz
compcert-kvx-2fd25fea96ecb39d2792f463b60fb39594fc75be.zip
Allow adding of attributes in valid_assignment_attr.
Implementing the same behavior as gcc anc clang. Bug 18004
Diffstat (limited to 'cparser/Cutil.ml')
-rw-r--r--cparser/Cutil.ml4
1 files changed, 2 insertions, 2 deletions
diff --git a/cparser/Cutil.ml b/cparser/Cutil.ml
index 1109cf79..94e3e85d 100644
--- a/cparser/Cutil.ml
+++ b/cparser/Cutil.ml
@@ -898,12 +898,12 @@ let is_debug_stmt s =
(* Assignment compatibility check over attributes.
Standard attributes ("const", "volatile", "restrict") can safely
be added (to the rhs type to get the lhs type) but must not be dropped.
- Custom attributes can safely be dropped but must not be added. *)
+ Custom attributes can safely be dropped or added. *)
let valid_assignment_attr afrom ato =
let (afromstd, afromcustom) = List.partition attr_is_standard afrom
and (atostd, atocustom) = List.partition attr_is_standard ato in
- incl_attributes afromstd atostd && incl_attributes atocustom afromcustom
+ incl_attributes afromstd atostd
(* Check that an assignment is allowed *)