thank you for your response but it did not do the trick if i do a truly 64-bit compile my addresses also become wider :-) and this is not what i want yet.
what i do want is that if i put a number in another number that could result in a overflow at runtime, the compiler gives me a warning a compile time. the language 'c' has a bad history in this (loose typechecking), but things have improved over the years and i was wondering how to do the trick these days since the code below compiles without any warning. this is not ok.
i hope i am much clearer now
maybe it is an OT question and more a syntaxis thing than an Xcode thing, but thanks anyway for taking the time
void test(void){ int myint; int64_t myintbig=412345678;
myint=myintbig; }
my question is: how (and where) do i tell xcode to generate an error on the above assignment?
-Wshorten-64-to-32 This flag is like -Wconversion , but is specific to 64-bit data types. This flag causes GCC to issue a warning whenever a value is implicitly converted (truncated) from a 64-bit type to a 32-bit type. You should fix any warnings generated by this flag, as they are likely to be bugs.
|