Changeset 181326 in webkit


Ignore:
Timestamp:
Mar 10, 2015 9:01:51 AM (9 years ago)
Author:
commit-queue@webkit.org
Message:

GCC: CRASH() should be annotated with NORETURN
https://bugs.webkit.org/show_bug.cgi?id=142524

Patch by Michael Catanzaro <Michael Catanzaro> on 2015-03-10
Reviewed by Anders Carlsson.

Source/JavaScriptCore:

Don't return from a NORETURN function. This used to avoid a warning from GCC, but now it
causes one.

  • jsc.cpp:

Source/WTF:

Add COMPILER(GCC) to #ifdefs that already exist for Clang.

  • wtf/Assertions.cpp:
  • wtf/Assertions.h:
Location:
trunk/Source
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r181319 r181326  
     12015-03-10  Michael Catanzaro  <mcatanzaro@igalia.com>
     2
     3        GCC: CRASH() should be annotated with NORETURN
     4        https://bugs.webkit.org/show_bug.cgi?id=142524
     5
     6        Reviewed by Anders Carlsson.
     7
     8        Don't return from a NORETURN function. This used to avoid a warning from GCC, but now it
     9        causes one.
     10
     11        * jsc.cpp:
     12
    1132015-03-10  Mark Lam  <mark.lam@apple.com>
    214
  • trunk/Source/JavaScriptCore/jsc.cpp

    r180637 r181326  
    364364    {
    365365        RELEASE_ASSERT_NOT_REACHED();
    366 #if COMPILER_QUIRK(CONSIDERS_UNREACHABLE_CODE)
    367         return true;
    368 #endif
    369366    }
    370367
  • trunk/Source/WTF/ChangeLog

    r181313 r181326  
     12015-03-10  Michael Catanzaro  <mcatanzaro@igalia.com>
     2
     3        GCC: CRASH() should be annotated with NORETURN
     4        https://bugs.webkit.org/show_bug.cgi?id=142524
     5
     6        Reviewed by Anders Carlsson.
     7
     8        Add COMPILER(GCC) to #ifdefs that already exist for Clang.
     9
     10        * wtf/Assertions.cpp:
     11        * wtf/Assertions.h:
     12
    1132015-03-09  Commit Queue  <commit-queue@webkit.org>
    214
  • trunk/Source/WTF/wtf/Assertions.cpp

    r179450 r181326  
    321321    *(int *)(uintptr_t)0xbbadbeef = 0;
    322322    // More reliable, but doesn't say BBADBEEF.
    323 #if COMPILER(CLANG)
     323#if COMPILER(CLANG) || COMPILER(GCC)
    324324    __builtin_trap();
    325325#else
     
    335335    *(int *)(uintptr_t)0xfbadbeef = 0;
    336336    // More reliable, but doesn't say fbadbeef.
    337 #if COMPILER(CLANG)
     337#if COMPILER(CLANG) || COMPILER(GCC)
    338338    __builtin_trap();
    339339#else
  • trunk/Source/WTF/wtf/Assertions.h

    r180668 r181326  
    113113   Signals are ignored by the crash reporter on OS X so we must do better.
    114114*/
    115 #if COMPILER(CLANG) || COMPILER(MSVC)
     115#if COMPILER(CLANG) || COMPILER(GCC) || COMPILER(MSVC)
    116116#define NO_RETURN_DUE_TO_CRASH NO_RETURN
    117117#else
Note: See TracChangeset for help on using the changeset viewer.