CIL cannot parse a line containing an empty #pragma.
If your compiler uses pragmas in places other than the top-level, you may have to preprocess the sources in a special way (sed, perl, etc.) to remove pragmas from these locations.
int bar(int ()); // This prototype cannot be parsed int bar(int x()); // If you add a name to the function, it works int bar(int (*)()); // This also works (and it is more appropriate)
g(); // This cannot be parsed int g(); // This is Ok
typedef signed char __s8; __s8 unsigned uchartest; // This is unsigned char for gcc
int globalArray[(1.0 < 2.0) ? 5 : 50]
With old versions of gcc, if optimizations are turned on then the extern inline function is inlined at all of its occurrences from the point of its definition all the way to the point where the (optional) second definition appears. No body is generated for an extern inline function. A body is generated for the real definition and that one is used in the rest of the file.
With new versions of gcc, the extern inline function is used only if there is no actual (non-extern) second definition (i.e. the second definition is used in the whole file, even for calls between the extern inline definition and the second definition).
By default, CIL follows the current gcc behavior for extern inline. However, if you set oldstyleExternInline to true, you will get an emulation of gcc’s old behaviour (under the assumption that optimizations are enabled): CIL will rename your extern inline function (and its uses) with the suffix __extinline. This means that if you have two such definition, that do different things and the optimizations are not on, then the CIL version might compute a different answer! Also, if you have multiple extern inline declarations then CIL will ignore but the first one. This is not so bad because GCC itself would not like it.
Variable-length arrays are not supported as fields of a struct or union.
mytype x = __builtin_va_arg(marker, mytype)into
mytype x; __builtin_va_arg(marker, sizeof(mytype), &x);
The latter form is used internally in CIL. However, the CIL pretty printer will try to emit the original code.
Similarly, __builtin_types_compatible_p(t1, t2), which takes types as arguments, is represented internally as __builtin_types_compatible_p(sizeof t1, sizeof t2), but the sizeofs are removed when printing.