# Changes

## 21 Changes

- August 7, 2004: Released version 1.3.1
- August 4, 2004: Fixed a bug in splitting of structs using `--dosimplify`
- July 29, 2004: Minor changes to the type typeSig (type signatures) to ensure that they do not contain types, so that you can do structural comparison without danger of nontermination.
- July 28, 2004: Ocaml version 3.08 is required. Numerous small changes while porting to Ocaml 3.08.
- July 7, 2004: Released version 1.2.6
- July 2, 2004: Character constants such as `'c'` should have type `int`, not `char`. Added a utility function `Cil.charConstToInt` that sign-extends chars greater than 128, if needed.
- July 2, 2004: Fixed a bug that was casting values to int before applying the logical negation operator !. This caused problems for floats, and for integer types bigger than `int`.
- June 13, 2004: Added the field `sallstmts` to a function description, to hold all statements in the function.
- June 13, 2004: Added new extensions for data flow analyses, and for computing dominators.
- June 10, 2004: Force initialization of CIL at the start of Cabs2cil.
- June 9, 2004: Added support for GCC `__attribute_used__`
- April 7, 2004: Released version 1.2.5
- April 7, 2004: Allow now to run ./configure CC=cl and set the MSVC compiler to be the default. The MSVC driver will now select the default name of the .exe file like the CL compiler.
- April 7, 2004: Fixed a bug in the driver. The temporary files are deleted by the Perl script before the CL compiler gets to them?
- April 7, 2004: Added the - form of arguments to the MSVC driver.
- April 7, 2004: Added a few more GCC-specific string escapes, (, [, {, %, E.
- April 7, 2004: Fixed bug with continuation lines in MSVC.
- April 6, 2004: Fixed embarassing bug in the parser: the precedence of casts and unary operators was switched.
- April 5, 2004: Fixed a bug involving statements mixed between declarations containing initializers. Now we make sure that the initializers are run in the proper order with respect to the statements.
- April 5, 2004: Fixed a bug in the merger. The merger was keeping separate alpha renaming talbes (namespaces) for variables and types. This means that it might end up with a type and a variable named the same way, if they come from different files, which breaks an important CIL invariant.
- March 11, 2004 : Fixed a bug in the Cil.copyFunction function. The new local variables were not getting fresh IDs.
- March 5, 2004: Fixed a bug in the handling of static function prototypes in a block scope. They used to be renamed. Now we just consider them global.
- February 20, 2004: Released version 1.2.4
- February 15, 2004: Changed the parser to allow extra semicolons after field declarations.
- February 14, 2004: Changed the Errormsg functions: error, unimp, bug to not raise an exception. Instead they just set Errormsg.hadErrors.
- February 13, 2004: Change the parsing of attributes to recognize enumeration constants.
- February 10, 2004: In some versions of `gcc` the identifier _{thread is an identifier and in others it is a keyword. Added code during configuration to detect which is the case.
- January 7, 2004: Released version 1.2.3
- January 7, 2004: Changed the alpha renamer to be less conservative. It will remember all versions of a name that were seen and will only create a new name if we have not seen one.
- December 30, 2003 : Extended the `cilly` command to understand better linker command options `-lfoo`.
- December 5, 2003: Added markup commands to the pretty-printer module. Also, changed the ``@<'' left-flush command into ``@''.
- December 4, 2003: Wide string literals are now handled directly by Cil (rather than being exploded into arrays). This is apparently handy for Microsoft Device Driver APIs that use intrinsic functions that require literal constant wide-string arguments.
- December 3, 2003: Added support for structured exception handling extensions for the Microsoft compilers.
- December 1, 2003: Fixed a Makefile bug in the generation of the Cil library (e.g., `cil.cma`) that was causing it to be unusable. Thanks to KEvin Millikin for pointing out this bug.
- November 26, 2003: Added support for linkage specifications (extern ``C'').
- November 26, 2003: Added the ocamlutil directory to contain some utilities shared with other projects.
- November 25, 2003: Released version 1.2.2
- November 24, 2003: Fixed a bug that allowed a static local to conflict with a global with the same name that is declared later in the file.
- November 24, 2003: Removed the `--keep` option of the `cilly` driver and replaced it with `--save-temps`.
- November 24, 2003: Added printing of what CIL features are being run.
- November 24, 2003: Fixed a bug that resulted in attributes being dropped for integer types.
- November 11, 2003: Fixed a bug in the visitor for enumeration definitions.
- October 24, 2003: Fixed a problem in the configuration script. It was not recognizing the Ocaml version number for beta versions.
- October 15, 2003: Fixed a problem in version 1.2.1 that was preventing compilation on OCaml 3.04.
- September 17, 2003: Released version 1.2.1.
- September 7, 2003: Redesigned the interface for choosing `#line` directive printing styles. Cil.printLn and Cil.printLnComment have been merged into Cil.lineDirectiveStyle.
- August 8, 2003: Do not silently pad out functions calls with arguments to match the prototype.
- August 1, 2003: A variety of fixes suggested by Steve Chamberlain: initializers for externs, prohibit float literals in enum, initializers for unsized arrays were not working always, an overflow problem in Ocaml, changed the processing of attributes before struct specifiers
- July 14, 2003: Add basic support for GCC's "__thread" storage qualifier. If given, it will appear as a "thread" attribute at the top of the type of the declared object. Treatment is very similar to "__declspec(...)" in MSVC
- July 8, 2003: Fixed some of the __alignof computations. Fixed bug in the designated initializers for arrays (Array.get error).
- July 8, 2003: Fixed infinite loop bug (Stack Overflow) in the visitor for __alignof.
- July 8, 2003: Fixed bug in the conversion to CIL. A function or array argument of the GCC __typeof() was being converted to pointer type. Instead, it should be left alone, just like for sizeof.
- July 7, 2003: New Escape module provides utility functions for escaping characters and strings in accordance with C lexical rules.
- July 2, 2003: Relax CIL's rules for when two enumeration types are considered compatible. Previously CIL considered two enums to be compatible if they were the same enum. Now we follow the C99 standard.
- June 28, 2003: In the Formatparse module, Eric Haugh found and fixed a bug in the handling of lvalues of the form ``lv->field.more''.
- June 28, 2003: Extended the handling of gcc command lines arguments in the Perl scripts.
- June 23, 2003: In Rmtmps module, simplified the API for customizing the root set. Clients may supply a predicate that returns true for each root global. Modifying various ```referenced`'' fields directly is no longer supported.
- June 17, 2003: Reimplement internal utility routine `Cil.escape_char`. Faster and better.
- June 14, 2003: Implemented support for `__attribute__s` appearing between "struct" and the struct tag name (also for unions and enums), since gcc supports this as documented in section 4.30 of the gcc (2.95.3) manual
- May 30, 2003: Released the regression tests.
- May 28, 2003: Released version 1.1.2
- May 26, 2003: Add the `simplify` module that compiles CIL expressions into simpler expressions, similar to those that appear in a 3-address intermediate language.
- May 26, 2003: Various fixes and improvements to the pointer analysis modules.
- May 26, 2003: Added optional consistency checking for transformations.
- May 25, 2003: Added configuration support for big endian machines. Now Cil.little_endian can be used to test whether the machine is little endian or not.
- May 22, 2003: Fixed a bug in the handling of inline functions. The CIL merger used to turn these functions into ``static'', which is incorrect.
- May 22, 2003: Expanded the CIL consistency checker to verify undesired sharing relationships between data structures.
- May 22, 2003: Fixed bug in the `oneret` CIL module: it was mishandling certain labeled return statements.
- May 5, 2003: Released version 1.0.11
- May 5, 2003: OS X (powerpc/darwin) support for CIL. Special thanks to Jeff Foster, Andy Begel and Tim Leek.
- April 30, 2003: Better description of how to use CIL for your analysis.
- April 28, 2003: Fixed a bug with `--dooneRet` and `--doheapify`. Thanks, Manos Renieris.
- April 16, 2003: Reworked management of temporary/intermediate output files in Perl driver scripts. Default behavior is now to remove all such files. To keep intermediate files, use one of the following existing flags:
  - `--keepmerged` for the single-file merge of all sources
  - `--keep=<``dir``>` for various other CIL and CCured output files
  - `-save-temps` for various gcc intermediate files; MSVC has no equivalent option
  As part of this change, some intermediate files have changed their names slightly so that new suffixes are always preceded by a period. For example, CCured output that used to appear in ```foocured.c`'' now appears in ```foo.cured.c`''.
- April 7, 2003: Changed the representation of the Cil.GVar global constructor. Now it is possible to update the initializer without reconstructing the global (which in turn it would require reconstructing the list of globals that make up a program). We did this because it is often tempting to use Cil.visitCilFileSameGlobals and the Cil.GVar was the only global that could not be updated in place.
- April 6, 2003: Reimplemented parts of the cilly.pl script to make it more robust in the presence of complex compiler arguments.
- March 10, 2003: Released version 1.0.9
- March 10, 2003: Unified and documented a large number of CIL Library Modules: oneret, simplemem, makecfg, heapify, stackguard, partial. Also documented the main client interface for the pointer analysis.
- February 18, 2003: Fixed a bug in logwrites that was causing it to produce invalid C code on writes to bitfields. Thanks, David Park.
- February 15, 2003: Released version 1.0.8
- February 15, 2003: PDF versions of the manual and API are available for those who would like to print them out.
- February 14, 2003: CIL now comes bundled with alias analyses.
- February 11, 2003: Added support for adding/removing options from `./configure`.
- February 3, 2003: Released version 1.0.7
- February 1, 2003: Some bug fixes in the handling of variable argument functions in new versions of `gcc` And `glibc`.
- January 29, 2003: Added the logical AND and OR operators. Exapanded the translation to CIL to handle more complicated initializers (including those that contain logical operators).
- January 28, 2003: Released version 1.0.6
- January 28, 2003: Added support for the new handling of variable-argument functions in new versions of `glibc`.
- January 19, 2003: Added support for declarations in interpreted constructors. Relaxed the semantics of the patterns for variables.
- January 17, 2003: Added built-in prototypes for the gcc built-in functions. Changed the `pGlobal` method in the printers to print the carriage return as well.
- January 9, 2003: Reworked lexer and parser's strategy for tracking source file names and line numbers to more closely match typical native compiler behavior. The visible CIL interface is unchanged.
- January 9, 2003: Changed the interface to the alpha convertor. Now you can pass a list where it will record undo information that you can use to revert the changes that it makes to the scope tables.
- January 6, 2003: Released version 1.0.5
- January 4, 2003: Changed the interface for the Formatcil module. Now the placeholders in the pattern have names. Also expanded the documentation of the Formatcil module. Now the placeholders in the pattern have names.
- January 3, 2003: Extended the `rmtmps` module to also remove unused labels that are generated in the conversion to CIL. This reduces the number of warnings that you get from `cgcc` afterwards.
- December 17, 2002: Fixed a few bugs in CIL related to the representation of string literals. The standard says that a string literal is an array. In CIL, a string literal has type pointer to character. This is Ok, except as an argument of sizeof. To support this exception, we have added to CIL the expression constructor SizeOfStr. This allowed us to fix bugs with computing `sizeof("foo bar")` and `sizeof((char*)"foo bar")` (the former is 8 and the latter is 4).
- December 8, 2002: Fixed a few bugs in the lexer and parser relating to hex and octal escapes in string literals. Also fixed the dependencies between the lexer and parser.
- December 5, 2002: Fixed visitor bugs that were causing some attributes not to be visited and some queued instructions to be dropped.
- December 3, 2002: Added a transformation to catch stack overflows. Fixed the heapify transformation.
- October 14, 2002: CIL is now available under the BSD license (see the License section or the file LICENSE). Released version 1.0.4
- October 9, 2002: More FreeBSD configuration changes, support for the GCC-ims `__signed` and `__volatile`. Thanks to Axel Simon for pointing out these problems. Released version 1.0.3
- October 8, 2002: FreeBSD configuration and porting fixes. Thanks to Axel Simon for pointing out these problems.
- September 10, 2002: Fixed bug in conversion to CIL. Now we drop all ``const'' qualifiers from the types of locals, even from the fields of local structures or elements of arrays.
- September 7, 2002: Extended visitor interface to distinguish visitng offsets inside lvalues from offsets inside initializer lists.
- September 7, 2002: Released version 1.0.1
- September 6, 2002: Extended the patcher with the `ateof` flag.
- September 4, 2002: Fixed bug in the elaboration to CIL. In some cases constant folding of `||` and `&&` was computed wrong.
- September 3, 2002: Fixed the merger documentation.
- August 29, 2002: Released version 1.0.0.
- August 29, 2002: Started numbering versions with a major nubmer, minor and revisions. Released version 1.0.0.
- August 25, 2002: Fixed the implementation of the unique identifiers for global variables and composites. Now those identifiers are globally unique.
- August 24, 2002: Added to the machine-dependent configuration the `sizeof` `void`. It is 1 on gcc and 0 on MSVC. Extended the implementation of `Cil.bitsSizeOf` to handle this (it was previously returning an error when trying to compute the size of `void`).
- August 24, 2002: Changed the representation of structure and unions to distinguish between undefined structures and those that are defined to be empty (allowed on gcc). The sizeof operator is undefined for the former and returns 0 for the latter.
- August 22, 2002: Apply a patch from Richard H. Y. to support FreeBSD installations. Thanks, Richard!
- August 12, 2002: Fixed a bug in the translation of wide-character strings. Now this translation matches that of the underlying compiler. Changed the implementation of the compiler dependencies.
- May 25, 2002: Added interpreted constructors and destructors.
- May 17, 2002: Changed the representation of functions to move the ``inline'' information to the varinfo. This way we can print the ``inline'' even in declarations which is what gcc does.
- May 15, 2002: Changed the visitor for initializers to make two tail-recursive passes (the second is a `List.rev` and only done if one of the initializers change). This prevents `Stack_Overflow` for large initializers. Also improved the processing of initializers when converting to CIL.
- May 15, 2002: Changed the front-end to allow the use of `MSVC` mode even on machines that do not have MSVC. The machine-dependent parameters for GCC will be used in that case.
- May 11, 2002: Changed the representation of formals in function types. Now the function type is purely functional.
- May 4, 2002: Added the function Cil.visitCilFileSameGlobals and changed Cil.visitCilFile to be tail recursive. This prevents stack overflow on huge files.
- February 28, 2002: Changed the significance of the `CompoundInit` in Cil.init to allow for missing initializers at the end of an array initializer. Added the API function Cil.foldLeftCompoundAll.