• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: typechecking
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: typechecking


  • Subject: Re: typechecking
  • From: Perry Winkel <email@hidden>
  • Date: Sun, 04 May 2008 23:40:14 +0200

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?


64-Bit Transition Guide: Compiling 64-Bit Code Using GCC

-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.



--
met vriendelijke groeten
perry winkel

http://www.perry7.nl
http://www.myspace.com/dehufters




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: typechecking
      • From: Jeremy Pereira <email@hidden>
References: 
 >typechecking (From: email@hidden)
 >Re: typechecking (From: Chris Espinosa <email@hidden>)

  • Prev by Date: Re: Subdirectories in Framework Public Header
  • Next by Date: Re: [SOLVED] IB Plugin - Can't drag to custom content view
  • Previous by thread: Re: typechecking
  • Next by thread: Re: typechecking
  • Index(es):
    • Date
    • Thread