1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-24 04:33:24 +00:00

Fix build on head

PR:		ports/174211
Submitted by:	Jan Beich <jbeich@tormail.org>
Feature safe:	yes
This commit is contained in:
Florian Smeets 2012-12-07 12:37:55 +00:00
parent 6ad5396a43
commit 5a9861c8b4
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=308419
2 changed files with 104 additions and 0 deletions

View File

@ -0,0 +1,52 @@
commit 66b3921
Author: Terrence Cole <terrence@mozilla.com>
Date: Tue Sep 11 12:31:04 2012 -0700
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.
---
js/src/jsinterp.cpp | 3 ++-
js/src/jsutil.h | 8 ++++----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git js/src/jsinterp.cpp js/src/jsinterp.cpp
index 0094c72..27a64a7 100644
--- mozilla/js/src/jsinterp.cpp
+++ mozilla/js/src/jsinterp.cpp
@@ -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);
diff --git js/src/jsutil.h js/src/jsutil.h
index 8838b6f..016a877 100644
--- mozilla/js/src/jsutil.h
+++ mozilla/js/src/jsutil.h
@@ -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) \

View File

@ -0,0 +1,52 @@
commit 66b3921
Author: Terrence Cole <terrence@mozilla.com>
Date: Tue Sep 11 12:31:04 2012 -0700
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.
---
js/src/jsinterp.cpp | 3 ++-
js/src/jsutil.h | 8 ++++----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git js/src/jsinterp.cpp js/src/jsinterp.cpp
index 0094c72..27a64a7 100644
--- js/src/jsinterp.cpp
+++ js/src/jsinterp.cpp
@@ -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);
diff --git js/src/jsutil.h js/src/jsutil.h
index 8838b6f..016a877 100644
--- js/src/jsutil.h
+++ js/src/jsutil.h
@@ -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) \