by default equals between two CTypes will only compare their ATypes (including the ATypes of nested CTypes)
by default equals between two CTypes will only compare their ATypes (including the ATypes of nested CTypes)
that is, equality checking does not care about const, volatile, and object. to check equality of two CTypes including these parameters use equalsCType
note, this check currently only checks the top-level CTypes for equality, but uses the AType equality for nested structures in CAnonymousStruct and CFunction
Missing from used formalization:
We omit the following features of C's type system: enumeration types, the type qualifiers const and volatile, bit-elds, and union types. Furthermore we do not allow functions to take variable numbers of arguments, and we also gloss over the typedef construct, assuming that this last facility is compiled out in such a way that occurrences of type identifiers are replaced with the type that they abbreviate.
Our treatment of functions and array types as function parameters is different from that in the standard. In the case of functions, the standard makes use of what it terms pointers to functions. These are essentially variables that can contain references to functions, where possible values are all of the program's dened functions. This is how we shall treat func tion references henceforth, stripping them of the confusing semantic baggage associated with pointers. (The language in the standard is continually having to make exceptions for pointers to functions in its description of operations on pointers. It is not possible to perform pointer arithmetic on function references, and dereferencing of function pointers is an idempotent operation.) This clarity of exposition will also be evident in the discussion of the dynamic semantics. We will discuss the nature of array types, and how our denition differs from that given in the standard in section 2.3 below.