• 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: Chris Espinosa <email@hidden>
  • Date: Fri, 2 May 2008 09:43:05 -0700


On Apr 30, 2008, at 3:32 AM, email@hidden wrote:
i think 'being accurate' is very important in the case of writing
software. and storing a 64 bit value in a variable that is not
capable of holding that much bits, should lead to an error, preferably
a compiler error.

i wrote the following function:

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.


 _______________________________________________
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: Perry Winkel <email@hidden>
References: 
 >typechecking (From: email@hidden)

  • Prev by Date: typechecking
  • Next by Date: Re: Xcode Document Browser cannot open search results in itself
  • Previous by thread: typechecking
  • Next by thread: Re: typechecking
  • Index(es):
    • Date
    • Thread