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

Side by Side Diff: third_party/tcmalloc/chromium/src/base/basictypes.h

Issue 2793793002: Fix -Wshift-negative-value transgression in tcmalloc. (Closed)
Patch Set: Created 3 years, 8 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 | « third_party/tcmalloc/README.chromium ('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 // Copyright (c) 2005, Google Inc. 1 // Copyright (c) 2005, Google Inc.
2 // All rights reserved. 2 // All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 const uint64 kuint64max = ( (((uint64) kuint32max) << 32) | kuint32max ); 75 const uint64 kuint64max = ( (((uint64) kuint32max) << 32) | kuint32max );
76 76
77 const int8 kint8max = ( ( int8) 0x7F); 77 const int8 kint8max = ( ( int8) 0x7F);
78 const int16 kint16max = ( ( int16) 0x7FFF); 78 const int16 kint16max = ( ( int16) 0x7FFF);
79 const int32 kint32max = ( ( int32) 0x7FFFFFFF); 79 const int32 kint32max = ( ( int32) 0x7FFFFFFF);
80 const int64 kint64max = ( ((( int64) kint32max) << 32) | kuint32max ); 80 const int64 kint64max = ( ((( int64) kint32max) << 32) | kuint32max );
81 81
82 const int8 kint8min = ( ( int8) 0x80); 82 const int8 kint8min = ( ( int8) 0x80);
83 const int16 kint16min = ( ( int16) 0x8000); 83 const int16 kint16min = ( ( int16) 0x8000);
84 const int32 kint32min = ( ( int32) 0x80000000); 84 const int32 kint32min = ( ( int32) 0x80000000);
85 const int64 kint64min = ( ((( int64) kint32min) << 32) | 0 ); 85 const int64 kint64min = (-kint64max - 1LL);
Primiano Tucci (use gerrit) 2017/04/02 16:49:44 took my a while to figure out why this was defined
Nico 2017/04/02 18:17:54 0xffff is an int literal. 0xffffLL should work, bu
Lei Zhang 2017/04/03 20:51:07 Do we want to file a bug to refresh tcmalloc with
86 86
87 // Define the "portable" printf and scanf macros, if they're not 87 // Define the "portable" printf and scanf macros, if they're not
88 // already there (via the inttypes.h we #included above, hopefully). 88 // already there (via the inttypes.h we #included above, hopefully).
89 // Mostly it's old systems that don't support inttypes.h, so we assume 89 // Mostly it's old systems that don't support inttypes.h, so we assume
90 // they're 32 bit. 90 // they're 32 bit.
91 #ifndef PRIx64 91 #ifndef PRIx64
92 #define PRIx64 "llx" 92 #define PRIx64 "llx"
93 #endif 93 #endif
94 #ifndef SCNx64 94 #ifndef SCNx64
95 #define SCNx64 "llx" 95 #define SCNx64 "llx"
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 // zeroes (which the loader does for static variables), AND the destructor also 348 // zeroes (which the loader does for static variables), AND the destructor also
349 // does nothing to the storage, then a constructor declared as 349 // does nothing to the storage, then a constructor declared as
350 // explicit MyClass(base::LinkerInitialized x) {} 350 // explicit MyClass(base::LinkerInitialized x) {}
351 // and invoked as 351 // and invoked as
352 // static MyClass my_variable_name(base::LINKER_INITIALIZED); 352 // static MyClass my_variable_name(base::LINKER_INITIALIZED);
353 namespace base { 353 namespace base {
354 enum LinkerInitialized { LINKER_INITIALIZED }; 354 enum LinkerInitialized { LINKER_INITIALIZED };
355 } 355 }
356 356
357 #endif // _BASICTYPES_H_ 357 #endif // _BASICTYPES_H_
OLDNEW
« no previous file with comments | « third_party/tcmalloc/README.chromium ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698