Title: [196871] trunk/Source
- Revision
- 196871
- Author
- [email protected]
- Date
- 2016-02-20 22:14:38 -0800 (Sat, 20 Feb 2016)
Log Message
Use of inlined asm statements causes problems for -std=c99 builds.
https://bugs.webkit.org/show_bug.cgi?id=154507
Reviewed by Dan Bernstein.
Source/bmalloc:
* bmalloc/BAssert.h:
Source/WTF:
WTF's Assertions.h may inadvertantly get included by other projects that are built
with -std=c99. The use of the inlined asm statements with the keyword "asm" is
not recognized when the -std compiler flag is used.
https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html says "When writing code that
can be compiled with -ansi and the various -std options, use __asm__ instead of
asm (see Alternate Keywords)."
So, to be a good citizen, we can change the use of "asm" in CRASH() to "__asm__"
so that we don't break the build of such other projects.
* wtf/Assertions.h:
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (196870 => 196871)
--- trunk/Source/WTF/ChangeLog 2016-02-21 01:54:08 UTC (rev 196870)
+++ trunk/Source/WTF/ChangeLog 2016-02-21 06:14:38 UTC (rev 196871)
@@ -1,3 +1,23 @@
+2016-02-20 Mark Lam <[email protected]>
+
+ Use of inlined asm statements causes problems for -std=c99 builds.
+ https://bugs.webkit.org/show_bug.cgi?id=154507
+
+ Reviewed by Dan Bernstein.
+
+ WTF's Assertions.h may inadvertantly get included by other projects that are built
+ with -std=c99. The use of the inlined asm statements with the keyword "asm" is
+ not recognized when the -std compiler flag is used.
+
+ https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html says "When writing code that
+ can be compiled with -ansi and the various -std options, use __asm__ instead of
+ asm (see Alternate Keywords)."
+
+ So, to be a good citizen, we can change the use of "asm" in CRASH() to "__asm__"
+ so that we don't break the build of such other projects.
+
+ * wtf/Assertions.h:
+
2016-02-18 Brent Fulgham <[email protected]>
Extend HashCountedSet with a method to efficiently set the count of an entry
Modified: trunk/Source/WTF/wtf/Assertions.h (196870 => 196871)
--- trunk/Source/WTF/wtf/Assertions.h 2016-02-21 01:54:08 UTC (rev 196870)
+++ trunk/Source/WTF/wtf/Assertions.h 2016-02-21 06:14:38 UTC (rev 196871)
@@ -155,11 +155,11 @@
#if defined(NDEBUG) && OS(DARWIN)
#if CPU(X86_64) || CPU(X86)
-#define WTFBreakpointTrap() asm volatile ("int3")
+#define WTFBreakpointTrap() __asm__ volatile ("int3")
#elif CPU(ARM_THUMB2)
-#define WTFBreakpointTrap() asm volatile ("bkpt #0")
+#define WTFBreakpointTrap() __asm__ volatile ("bkpt #0")
#elif CPU(ARM64)
-#define WTFBreakpointTrap() asm volatile ("brk #0")
+#define WTFBreakpointTrap() __asm__ volatile ("brk #0")
#else
#error "Unsupported CPU".
#endif
Modified: trunk/Source/bmalloc/ChangeLog (196870 => 196871)
--- trunk/Source/bmalloc/ChangeLog 2016-02-21 01:54:08 UTC (rev 196870)
+++ trunk/Source/bmalloc/ChangeLog 2016-02-21 06:14:38 UTC (rev 196871)
@@ -1,3 +1,12 @@
+2016-02-20 Mark Lam <[email protected]>
+
+ Use of inlined asm statements causes problems for -std=c99 builds.
+ https://bugs.webkit.org/show_bug.cgi?id=154507
+
+ Reviewed by Dan Bernstein.
+
+ * bmalloc/BAssert.h:
+
2016-02-19 Joonghun Park <[email protected]>
Unreviewed. Fix debug build error since r196847
Modified: trunk/Source/bmalloc/bmalloc/BAssert.h (196870 => 196871)
--- trunk/Source/bmalloc/bmalloc/BAssert.h 2016-02-21 01:54:08 UTC (rev 196870)
+++ trunk/Source/bmalloc/bmalloc/BAssert.h 2016-02-21 06:14:38 UTC (rev 196871)
@@ -31,11 +31,11 @@
#if defined(NDEBUG) && BOS(DARWIN)
#if BCPU(X86_64) || BCPU(X86)
-#define BBreakpointTrap() asm volatile ("int3")
+#define BBreakpointTrap() __asm__ volatile ("int3")
#elif BCPU(ARM_THUMB2)
-#define BBreakpointTrap() asm volatile ("bkpt #0")
+#define BBreakpointTrap() __asm__ volatile ("bkpt #0")
#elif BCPU(ARM64)
-#define BBreakpointTrap() asm volatile ("brk #0")
+#define BBreakpointTrap() __asm__ volatile ("brk #0")
#else
#error "Unsupported CPU".
#endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes