Fixed ternary result type detection with pointer types.

Fixed pointer type comparison and conversion, especially regarding qualifiers.
Improved diagnostics about type comparison and conversion.
Reorganized some type-comparison/conversion functions.
This commit is contained in:
acqn
2021-03-15 16:59:08 +08:00
committed by Oliver Schmidt
parent 31c1172a3a
commit b802efde54
9 changed files with 466 additions and 336 deletions

View File

@@ -78,7 +78,7 @@ static int CopyStruct (ExprDesc* LExpr, ExprDesc* RExpr)
hie1 (RExpr);
/* Check for equality of the structs/unions */
if (TypeCmp (ltype, RExpr->Type) < TC_STRICT_COMPATIBLE) {
if (TypeCmp (ltype, RExpr->Type).C < TC_STRICT_COMPATIBLE) {
TypeCompatibilityDiagnostic (ltype, RExpr->Type, 1,
"Incompatible types in assignment to '%s' from '%s'");
}