Affected subclause: [basic.types]
Change: C allows mixing between âcompatible typesâ in several places where C++ does not
.
For example,
enumerated types are âcompatibleâ with their underlying types in C but, in C++,
enumerations are types distinct from their underlying types
. Rationale: Stricter type checking is essential for C++
. Effect on original feature: Deletion of semantically well-defined feature
. Difficulty of converting: Semantic transformation
. The âtypesafe linkageâ mechanism will find many, but not all,
such problems
. Some cases are allowed by C++
according to the âlayout compatibility rulesâ of this
document
.