diff --git a/js/src/jsutil.h b/js/src/jsutil.h index dc3567e3d8e5..a779343ee1f0 100644 --- a/js/src/jsutil.h +++ b/js/src/jsutil.h @@ -69,15 +69,11 @@ JS_Assert(const char *s, const char *file, JSIntn ln); /* * Compile-time assert. "condition" must be a constant expression. - * The macro should be used only once per source line in places where - * a "typedef" declaration is allowed. + * The macro can be used only in places where an "extern" declaration is + * allowed. */ #define JS_STATIC_ASSERT(condition) \ - JS_STATIC_ASSERT_IMPL(condition, __LINE__) -#define JS_STATIC_ASSERT_IMPL(condition, line) \ - JS_STATIC_ASSERT_IMPL2(condition, line) -#define JS_STATIC_ASSERT_IMPL2(condition, line) \ - typedef int js_static_assert_line_##line[(condition) ? 1 : -1] + extern void js_static_assert(int arg[(condition) ? 1 : -1]) /* ** Abort the process in a non-graceful manner. This will cause a core file,