Frama-C
  • Features
  • Documentation
  • Publications
  • Blog
  • Jobs
  • Contact
  • Download
Blog home
← CompCert gets a safe interpreter mode Better is the enemy of good... sometimes →

Fun with constants

Pascal Cuoq - 9th Sep 2011

Another facetious colleague reports a strange behavior with the following C program:

int main (void) { 
 int x = 100; 
 int y = 042; 
 int z = 005; 
 printf (\%d"  x+y+z); 
 return (x+y+z) - 147; 
} 
Pascal Cuoq
9th Sep 2011

← CompCert gets a safe interpreter mode Better is the enemy of good... sometimes →

Tags

facetious-colleagues skein value ACSL Jessie derived-analysis unspecified-behavior CIL OCaml floating-point rant memcpy value-builtins conversions-and-promotions icpc2011 csmith position donut slicing CompCert big-round-numbers trail nitrogen link benchmarks rte obviously-terminates cybersecurity linking type-checking developer visitor restrict undefined-behavior rers2012 cfg WP c11 c99 anonymous-arrays zlib metrics collaboration FLT_EVAL_METHOD function-pointers c-reduce Eva gui tutorial open-source-case-studies scripts usability windows-cygwin-wsl docker github ci test Ivette GUI event machdep parsing formal-spec MetAcsl RPP Aoraï Typestates
Copyright © 2007-2025 Frama-C. All Rights Reserved.
  • Terms Of Use
  • Authors
  • Acknowledgements