Bug 784631 - Fix some clang build errors in SpiderMonkey; r=Waldo f=espindola

Computed gotos are not in the C++ standard: clang and gcc differ on semantics.
This commit is contained in:
Terrence Cole 2012-09-11 12:31:04 -07:00
parent 7e5561a777
commit dfa36f048f
2 changed files with 6 additions and 5 deletions

View File

@ -1231,6 +1231,7 @@ js::Interpret(JSContext *cx, StackFrame *entryFrame, InterpMode interpMode)
RootedPropertyName rootName0(cx);
RootedId rootId0(cx);
RootedShape rootShape0(cx);
DebugOnly<uint32_t> blockDepth;
if (!entryFrame)
entryFrame = regs.fp();
@ -3650,7 +3651,7 @@ BEGIN_CASE(JSOP_LEAVEBLOCK)
BEGIN_CASE(JSOP_LEAVEFORLETIN)
BEGIN_CASE(JSOP_LEAVEBLOCKEXPR)
{
DebugOnly<uint32_t> blockDepth = regs.fp()->blockChain().stackDepth();
blockDepth = regs.fp()->blockChain().stackDepth();
regs.fp()->popBlock(cx);

View File

@ -432,10 +432,10 @@ typedef size_t jsbitmap;
#if defined(__clang__)
# define JS_SILENCE_UNUSED_VALUE_IN_EXPR(expr) \
JS_BEGIN_MACRO \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wunused-value\"") \
expr; \
_Pragma("clang diagnostic pop") \
_Pragma("(clang diagnostic push)") \
_Pragma("(clang diagnostic ignored \"-Wunused-value\")") \
{expr;} \
_Pragma("(clang diagnostic pop)") \
JS_END_MACRO
#elif (__GNUC__ >= 5) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
# define JS_SILENCE_UNUSED_VALUE_IN_EXPR(expr) \