Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1307)

Side by Side Diff: fusl/src/math/nearbyintl.c

Issue 1581793002: Remove -Wno-unknown-pragmas from fusl build (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: comment to clang bug Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fusl/src/math/nearbyintf.c ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include <math.h> 1 #include <math.h>
2 #include <float.h> 2 #include <float.h>
3 #include "libm.h"
3 4
4 #if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024 5 #if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
5 long double nearbyintl(long double x) 6 long double nearbyintl(long double x)
6 { 7 {
7 return nearbyint(x); 8 return nearbyint(x);
8 } 9 }
9 #else 10 #else
10 #include <fenv.h> 11 #include <fenv.h>
11 long double nearbyintl(long double x) 12 long double nearbyintl(long double x)
12 { 13 {
13 #ifdef FE_INEXACT 14 #ifdef FE_INEXACT
14 » #pragma STDC FENV_ACCESS ON 15 » PRAGMA_STDC_FENV_ACCESS_ON
15 int e; 16 int e;
16 17
17 e = fetestexcept(FE_INEXACT); 18 e = fetestexcept(FE_INEXACT);
18 #endif 19 #endif
19 x = rintl(x); 20 x = rintl(x);
20 #ifdef FE_INEXACT 21 #ifdef FE_INEXACT
21 if (!e) 22 if (!e)
22 feclearexcept(FE_INEXACT); 23 feclearexcept(FE_INEXACT);
23 #endif 24 #endif
24 return x; 25 return x;
25 } 26 }
26 #endif 27 #endif
OLDNEW
« no previous file with comments | « fusl/src/math/nearbyintf.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698