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

Side by Side Diff: nspr/pr/src/misc/prdtoa.c

Issue 27011005: Disable optimization in prdtoa.c under VS2013. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
OLDNEW
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public 2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 5
6 /* 6 /*
7 * This file is based on the third-party code dtoa.c. We minimize our 7 * This file is based on the third-party code dtoa.c. We minimize our
8 * modifications to third-party code to make it easy to merge new versions. 8 * modifications to third-party code to make it easy to merge new versions.
9 * The author of dtoa.c was not willing to add the parentheses suggested by 9 * The author of dtoa.c was not willing to add the parentheses suggested by
10 * GCC, so we suppress these warnings. 10 * GCC, so we suppress these warnings.
11 */ 11 */
12 #if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) 12 #if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)
13 #pragma GCC diagnostic ignored "-Wparentheses" 13 #pragma GCC diagnostic ignored "-Wparentheses"
14 #endif 14 #endif
15 15
16 #if _MSC_VER == 1800
17 // TODO(scottmg): Crashes VS2013 RC. Upstream bug filed and should be fixed
18 // in the next release. http://crbug.com/288948.
19 #pragma optimize("", off)
20 #endif
21
16 #include "primpl.h" 22 #include "primpl.h"
17 #include "prbit.h" 23 #include "prbit.h"
18 24
19 #define MULTIPLE_THREADS 25 #define MULTIPLE_THREADS
20 #define ACQUIRE_DTOA_LOCK(n) PR_Lock(dtoa_lock[n]) 26 #define ACQUIRE_DTOA_LOCK(n) PR_Lock(dtoa_lock[n])
21 #define FREE_DTOA_LOCK(n) PR_Unlock(dtoa_lock[n]) 27 #define FREE_DTOA_LOCK(n) PR_Unlock(dtoa_lock[n])
22 28
23 static PRLock *dtoa_lock[2]; 29 static PRLock *dtoa_lock[2];
24 30
25 void _PR_InitDtoa(void) 31 void _PR_InitDtoa(void)
(...skipping 3487 matching lines...) Expand 10 before | Expand all | Expand 10 after
3513 } 3519 }
3514 3520
3515 while (*nump != '\0') { 3521 while (*nump != '\0') {
3516 *bufp++ = *nump++; 3522 *bufp++ = *nump++;
3517 } 3523 }
3518 *bufp++ = '\0'; 3524 *bufp++ = '\0';
3519 } 3525 }
3520 done: 3526 done:
3521 PR_DELETE(num); 3527 PR_DELETE(num);
3522 } 3528 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698