We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2cd4154 commit cc63bdeCopy full SHA for cc63bde
src/ansi-c/c_typecheck_expr.cpp
@@ -1805,6 +1805,17 @@ void c_typecheck_baset::typecheck_expr_dereference(exprt &expr)
1805
error() << "dereferencing void pointer" << eom;
1806
throw 0;
1807
}
1808
+
1809
+ if(is_signed_or_unsigned_bitvector(expr.type()))
1810
+ {
1811
+ auto bv_type_width = to_bitvector_type(expr.type()).get_width();
1812
+ if(bv_type_width % 8 != 0)
1813
1814
+ throw invalid_source_file_exceptiont{
1815
+ "only bitvectors of size multiple of 8 can be dereferenced",
1816
+ expr.source_location()};
1817
+ }
1818
1819
1820
else
1821
{
0 commit comments