• 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: Exception on a simple arithmetic problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exception on a simple arithmetic problem


  • Subject: Re: Exception on a simple arithmetic problem
  • From: Chris Espinosa <email@hidden>
  • Date: Fri, 20 Jan 2006 10:21:53 -0800

On Jan 20, 2006, at 10:09 AM, Cameron Hayne wrote:

On Jan 20, 2006, at 4:30 AM, Peter wrote:

This happen during debugging my C code under XCode, compiled for Intel platform,


double fVal, fTemp;

fTemp = filesize;              /* filesize is a long long and is greater than 0 */

fVal = 100.0 / (double) fTemp; /* EXC_ARITHMETIC happens here  */


The debugger stop and throws EXC_ARITHMETIC message at the calculation line. When the program is in release mode(compile with -O2), this problem never happens during runtime. I am using OS 10.4.3 (8F1111).

What condition makes EXC_ARITHMETIC exception to be thrown under Pentium ?


Have you looked at /usr/include/mach/i386/exception.h and the subcodes for EXC_ARITHMETIC?

/*
 * EXC_ARITHMETIC
 */

#define EXC_I386_DIV 1
#define EXC_I386_INTO 2
#define EXC_I386_NOEXT 3
#define EXC_I386_EXTOVR 4
#define EXC_I386_EXTERR 5
#define EXC_I386_EMERR 6
#define EXC_I386_BOUND 7
#define EXC_I386_SSEEXTERR      8

This would help you narrow it down a little.

Chris
 _______________________________________________
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

References: 
 >Exception on a simple arithmetic problem (From: Peter <email@hidden>)
 >Re: Exception on a simple arithmetic problem (From: Eric Albert <email@hidden>)
 >Re: Exception on a simple arithmetic problem (From: Cameron Hayne <email@hidden>)

  • Prev by Date: Re: GCC for i386 allows 'invalid suffix "f" on integer constant'
  • Next by Date: Re: deprecated FOUR_CHAR_CODE and macintel
  • Previous by thread: Re: Exception on a simple arithmetic problem
  • Next by thread: Re: Exception on a simple arithmetic problem
  • Index(es):
    • Date
    • Thread