From 49a002ed5e4c7906b9e72c582ddde1d3647b72da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20G=C3=BCdemmann?= Date: Sun, 5 Jun 2016 16:44:44 +0200 Subject: [PATCH] change java bool type representation The JVM does not fully support a Boolean type. Instead, it uses an 32-bit integral type with value 0 for false and 1 for true (cf. 2.3.4 of the JVM Spec). In particular, the bytecodes iconst_0 and iconst_1 are used for false and true. --- src/java_bytecode/java_types.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/java_bytecode/java_types.cpp b/src/java_bytecode/java_types.cpp index cf09b4a5457..3b73d96d90d 100644 --- a/src/java_bytecode/java_types.cpp +++ b/src/java_bytecode/java_types.cpp @@ -164,7 +164,7 @@ Function: java_boolean_type typet java_boolean_type() { - return c_bool_typet(8); + return signedbv_typet(32); } /*******************************************************************\