Dave Korn wrote:
Robert Dewar wrote:The compiler should not assume validity unless it can prove that the value is actually in the declared range in my opinion.We could add a "-fstrict-validity=" by analogy to "-fstrict-alias=". Ada and C would want to have different default settings I imagine.
Well I don't think C has this issue, since it does not have subtype ranges??? Anyway I would not object to such a switch, providing that the default is -fno-strict-validity!
cheers, DaveK