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

Side by Side Diff: runtime/platform/globals.h

Issue 2924473002: Fix simarm build for newer gcc's (Closed)
Patch Set: Created 3 years, 6 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 | « no previous file | runtime/vm/constants_arm.h » ('j') | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef RUNTIME_PLATFORM_GLOBALS_H_ 5 #ifndef RUNTIME_PLATFORM_GLOBALS_H_
6 #define RUNTIME_PLATFORM_GLOBALS_H_ 6 #define RUNTIME_PLATFORM_GLOBALS_H_
7 7
8 // __STDC_FORMAT_MACROS has to be defined before including <inttypes.h> to 8 // __STDC_FORMAT_MACROS has to be defined before including <inttypes.h> to
9 // enable platform independent printf format specifiers. 9 // enable platform independent printf format specifiers.
10 #ifndef __STDC_FORMAT_MACROS 10 #ifndef __STDC_FORMAT_MACROS
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 273
274 // DART_NOINLINE tells compiler to never inline a particular function. 274 // DART_NOINLINE tells compiler to never inline a particular function.
275 #ifdef _MSC_VER 275 #ifdef _MSC_VER
276 #define DART_NOINLINE __declspec(noinline) 276 #define DART_NOINLINE __declspec(noinline)
277 #elif __GNUC__ 277 #elif __GNUC__
278 #define DART_NOINLINE __attribute__((noinline)) 278 #define DART_NOINLINE __attribute__((noinline))
279 #else 279 #else
280 #error Automatic compiler detection failed. 280 #error Automatic compiler detection failed.
281 #endif 281 #endif
282 282
283 // DART_UNUSED inidicates to the compiler that a variable/typedef is expected 283 // DART_UNUSED indicates to the compiler that a variable or typedef is expected
284 // to be unused and disables the related warning. 284 // to be unused and disables the related warning.
285 #ifdef __GNUC__ 285 #ifdef __GNUC__
286 #define DART_UNUSED __attribute__((unused)) 286 #define DART_UNUSED __attribute__((unused))
287 #else 287 #else
288 #define DART_UNUSED 288 #define DART_UNUSED
289 #endif 289 #endif
290 290
291 // DART_USED indicates to the compiler that a global variable or typedef is used
292 // disables e.g. the gcc warning "unused-variable"
293 #ifdef __GNUC__
294 #define DART_USED __attribute__((used))
295 #else
296 #define DART_USED
297 #endif
298
291 // DART_NORETURN indicates to the compiler that a function does not return. 299 // DART_NORETURN indicates to the compiler that a function does not return.
292 // It should be used on functions that unconditionally call functions like 300 // It should be used on functions that unconditionally call functions like
293 // exit(), which end the program. We use it to avoid compiler warnings in 301 // exit(), which end the program. We use it to avoid compiler warnings in
294 // callers of DART_NORETURN functions. 302 // callers of DART_NORETURN functions.
295 #ifdef _MSC_VER 303 #ifdef _MSC_VER
296 #define DART_NORETURN __declspec(noreturn) 304 #define DART_NORETURN __declspec(noreturn)
297 #elif __GNUC__ 305 #elif __GNUC__
298 #define DART_NORETURN __attribute__((noreturn)) 306 #define DART_NORETURN __attribute__((noreturn))
299 #else 307 #else
300 #error Automatic compiler detection failed. 308 #error Automatic compiler detection failed.
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 // tag in the ICData and check it when recreating the flow graph in 712 // tag in the ICData and check it when recreating the flow graph in
705 // optimizing compiler. Enable it for other modes (product, release) if needed 713 // optimizing compiler. Enable it for other modes (product, release) if needed
706 // for debugging. 714 // for debugging.
707 #if defined(DEBUG) 715 #if defined(DEBUG)
708 #define TAG_IC_DATA 716 #define TAG_IC_DATA
709 #endif 717 #endif
710 718
711 } // namespace dart 719 } // namespace dart
712 720
713 #endif // RUNTIME_PLATFORM_GLOBALS_H_ 721 #endif // RUNTIME_PLATFORM_GLOBALS_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/constants_arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698