Commit 03b66079 authored by Virgile Prevosto's avatar Virgile Prevosto
Browse files

[clang2ir] Fix translation of negative integral constants

and remove useless declaration
parent 9797b5ce
......@@ -9169,8 +9169,7 @@ bool FramacVisitor::VisitVarDecl(clang::VarDecl* Decl) {
clang::APValue* resultingValue = Decl->evaluateValue();
if (resultingValue) {
constantType = Decl->hasExternalStorage()?ICEXTERNCONST:ICSTATICCONST;
clang::APValue* resultingValue = Decl->evaluateValue();
value=(int64_t) resultingValue->getInt().getLimitedValue(UINT64_MAX);
value = resultingValue->getInt().getExtValue();
}
};
};
......
......@@ -46,8 +46,8 @@ struct _frama_c_rtti_name_info_node _frama_c_rtti_name_info =
.number_of_base_classes = 0,
.pvmt = (struct _frama_c_vmt *)0};
myStruct s = {.a = {(char)0}};
static int const I = (int)4294967295;
static long const L = (long)4294967295;
static int const I = -1;
static long const L = (long)(-1);
static long long const LL = (long long)(-1);
int main(void)
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment