This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix sin, cos, tan in non-default rounding modes (bug 3976)


On 03/02/2012 07:29 PM, Joseph S. Myers wrote:
On Fri, 2 Mar 2012, Andreas Jaeger wrote:

@@ -343,9 +360,13 @@ __sin(double x){
   	else {
   	  if (k == 0x7ff00000&&   u.i[LOW_HALF] == 0)
   	    __set_errno (EDOM);
-	  return x / x;
+	  retval = x / x;
+	  goto ret;

I suggest to remove the goto ret.

I think this code is clearer with goto ret used in each case including this one; it keeps the pattern consistent throughout the function and means that if the code gets rearranged and this bit of code moved then there's no need to add a goto ret in one place as part of the rearrangement.

Your call, this makes sense - I'm fine with a commit without the change that's why I said "suggest" ;)


Andreas
--
 Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
  SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
    GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]