Frama-C Bug Tracking System - Frama-C
View Issue Details
0000775Frama-CKernelpublic2011-03-31 15:462014-02-12 16:59
pascal 
monate 
normalminoralways
closedfixed 
Frama-C Carbon-20110201 
Frama-C Nitrogen-20111001 
0000775: Hex/octal signed constants can be represented in an unsigned extended integer type (csmith)
main(){
  int r = 0xE2DB80EBBD4856CDLL >= 1;
  return r;
}

This program, when compiled with GCC, returns 1. This is in accordance to page 56 of the C99 standard, where octal/hexadecimal LL constants can be represented as unsigned long long int when they do not fit inside a long long int.

However the front-end types the program wrongly, leading the value analysis to believe the return value is 0:

~/ppc/bin/toplevel.opt -val u.c -print

[value] Values for function main:
          r ? {0; }
/* Generated by Frama-C */
int main(void)
{
  int r ;
  r = 0xE2DB80EBBD4856CDLL >= (long long )1;
  return (r);
}
No tags attached.
related to 0000762closed virgile unsigned constants truncated (csmith) 
Issue History
2011-03-31 15:46pascalNew Issue
2011-03-31 15:46pascalStatusnew => assigned
2011-03-31 15:46pascalAssigned To => monate
2011-03-31 15:47pascalRelationship addedrelated to 0000762
2011-04-01 12:42monateStatusassigned => acknowledged
2011-04-01 15:39svnCheckin
2011-04-01 15:39svnStatusacknowledged => resolved
2011-04-01 15:39svnResolutionopen => fixed
2011-10-10 14:13signolesFixed in Version => Frama-C Nitrogen-20111001
2011-10-10 14:14signolesStatusresolved => closed
2014-02-12 16:59monateNote Added: 0004816
2014-02-12 16:59monateStatusclosed => resolved

Notes
(0004816)
monate   
2014-02-12 16:59   
Fix committed to stable/neon branch.