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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/constants_arm.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/platform/globals.h
diff --git a/runtime/platform/globals.h b/runtime/platform/globals.h
index 148343e229a4df81e88b22af9b832bdeadfc0aa9..a18bc8764edef5aefb9fd13b31045cec54d3c514 100644
--- a/runtime/platform/globals.h
+++ b/runtime/platform/globals.h
@@ -280,7 +280,7 @@ typedef simd128_value_t fpu_register_t;
#error Automatic compiler detection failed.
#endif
-// DART_UNUSED inidicates to the compiler that a variable/typedef is expected
+// DART_UNUSED indicates to the compiler that a variable or typedef is expected
// to be unused and disables the related warning.
#ifdef __GNUC__
#define DART_UNUSED __attribute__((unused))
@@ -288,6 +288,14 @@ typedef simd128_value_t fpu_register_t;
#define DART_UNUSED
#endif
+// DART_USED indicates to the compiler that a global variable or typedef is used
+// disables e.g. the gcc warning "unused-variable"
+#ifdef __GNUC__
+#define DART_USED __attribute__((used))
+#else
+#define DART_USED
+#endif
+
// DART_NORETURN indicates to the compiler that a function does not return.
// It should be used on functions that unconditionally call functions like
// exit(), which end the program. We use it to avoid compiler warnings in
« 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