Frama-C
  • Features
  • Documentation
  • Publications
  • Blog
  • Jobs
  • Contact
  • Download
Blog home
← Never forget to sanitize your input RERS 2012 competition: our solutions for problems 1-9 →

A proposal for named constants in C

Pascal Cuoq - 30th Sep 2012

If you liked my earlier proposal for a finer-grained restrict (1 2 3 4) you might like this slightly more serious proposal for named constants in C on Jens Gustedt's blog.

Or not. Here is a simple test to tell if you are likely to be interested: if you can readily discuss the relative advantages of const int C=1; #define C 1 and enum { C = 1 }; you will probably find Jens' proposal for arbitrary types fascinating.

Pascal Cuoq
30th Sep 2012

← Never forget to sanitize your input RERS 2012 competition: our solutions for problems 1-9 →

Tags

link skein value ACSL Jessie derived-analysis unspecified-behavior CIL OCaml floating-point rant memcpy value-builtins conversions-and-promotions icpc2011 csmith position donut facetious-colleagues slicing CompCert big-round-numbers trail nitrogen 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