2021-01-21 05:53 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000775Frama-CKernelpublic2014-02-12 16:59
Reporterpascal 
Assigned Tomonate 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
Product VersionFrama-C Carbon-20110201 
Target VersionFixed in VersionFrama-C Nitrogen-20111001 
Summary0000775: Hex/octal signed constants can be represented in an unsigned extended integer type (csmith)
Descriptionmain(){
  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);
}
TagsNo tags attached.
Attached Files

-Relationships
related to 0000762closedvirgile unsigned constants truncated (csmith) 
+Relationships

-Notes

~0004816

monate (reporter)

Fix committed to stable/neon branch.
+Notes

-Issue History
Date Modified Username Field Change
2011-03-31 15:46 pascal New Issue
2011-03-31 15:46 pascal Status new => assigned
2011-03-31 15:46 pascal Assigned To => monate
2011-03-31 15:47 pascal Relationship added related to 0000762
2011-04-01 12:42 monate Status assigned => acknowledged
2011-04-01 15:39 svn
2011-04-01 15:39 svn Status acknowledged => resolved
2011-04-01 15:39 svn Resolution open => fixed
2011-10-10 14:13 signoles Fixed in Version => Frama-C Nitrogen-20111001
2011-10-10 14:14 signoles Status resolved => closed
2013-12-19 01:12 svn Source_changeset_attached => framac master 4bfb0b63
2014-02-12 16:54 monate Source_changeset_attached => framac stable/neon 4bfb0b63
2014-02-12 16:59 monate Note Added: 0004816
2014-02-12 16:59 monate Status closed => resolved
+Issue History