• 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: Spurious warnings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Spurious warnings


  • Subject: Re: Spurious warnings
  • From: Jonas Maebe <email@hidden>
  • Date: Tue, 22 Jul 2008 08:17:36 +0100


On 22 Jul 2008, at 04:11, Bill Royds wrote:

On 21-Jul-08, at 13:48 , Jan E. Schotsman wrote:

But the type of my struct fields is not double, it is float! I still get the warnings!


Remember that all temporaries for calculations in C are double, even if the arguments are float.

At least not in gcc:

firefly:~/fpc/test jmaebe$ cat t.c
float test(float a, float b, float c, float d) {
  return (a*b/c)+d;
}
firefly:~/fpc/test jmaebe$ gcc -c -S t.c -arch ppc -O
firefly:~/fpc/test jmaebe$ cat t.s
	.section __TEXT,__text,regular,pure_instructions
	.section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
	.machine ppc7400
	.text
	.align 2
	.globl _test
_test:
	fmuls f2,f1,f2
	fdivs f2,f2,f3
	fadds f1,f2,f4
	blr
	.subsections_via_symbols

(the "s" suffix of those instructions means "single precision")


Jonas _______________________________________________ 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: 
 >Spurious warnings (From: "Jan E. Schotsman" <email@hidden>)
 >Re: Spurious warnings (From: Jens Alfke <email@hidden>)
 >Re: Spurious warnings (From: "Jan E. Schotsman" <email@hidden>)
 >Re: Spurious warnings (From: Bill Royds <email@hidden>)

  • Prev by Date: Flaky Copy Files build phase under 3.1
  • Next by Date: Direct Dependencies clarification
  • Previous by thread: Re: Spurious warnings
  • Next by thread: Re: Spurious warnings
  • Index(es):
    • Date
    • Thread