beginning of a taint mode; type system enhancements

This commit is contained in:
Araq
2011-09-24 00:46:41 +02:00
parent 2359b8b107
commit 6023e994fb
18 changed files with 265 additions and 283 deletions

View File

@@ -103,7 +103,7 @@ proc checkConversionBetweenObjects(info: TLineInfo, castDest, src: PType) =
proc checkConvertible(info: TLineInfo, castDest, src: PType) =
const
IntegralTypes = {tyBool, tyEnum, tyChar, tyInt..tyFloat128}
if sameType(castDest, src):
if sameType(castDest, src) and castDest.sym == src.sym:
# don't annoy conversions that may be needed on another processor:
if not (castDest.kind in {tyInt..tyFloat128, tyNil}):
Message(info, hintConvFromXtoItselfNotNeeded, typeToString(castDest))