mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-05 08:35:26 +00:00
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:
parent
3fe1c2ffd0
commit
b3325f556e
@ -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);
|
||||
|
||||
|
@ -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) \
|
||||
|
Loading…
Reference in New Issue
Block a user