Bug 186400

Summary: bmalloc: Fix 'noreturn' warnings when compiling with -std=gnu++17
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: bmallocAssignee: David Kilzer (:ddkilzer) <ddkilzer>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, fpizlo, ggaren, jfbastien, msaboff, saam, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch v1
none
Patch v2
none
Patch v3 none

Description David Kilzer (:ddkilzer) 2018-06-07 10:01:13 PDT
Fix 'noreturn' warnings when compiling bmalloc with -std=gnu++17:

Source/bmalloc/bmalloc/Scavenger.cpp:363:1: error: function 'threadRunLoop' could be declared with attribute 'noreturn' [-Werror,-Wmissing-noreturn]
{
^

Source/bmalloc/bmalloc/Scavenger.cpp:358:1: error: function 'threadEntryPoint' could be declared with attribute 'noreturn' [-Werror,-Wmissing-noreturn]
{
^

2 errors generated.
Comment 1 David Kilzer (:ddkilzer) 2018-06-07 10:20:03 PDT
Created attachment 342184 [details]
Patch v1
Comment 2 David Kilzer (:ddkilzer) 2018-06-07 10:27:24 PDT
Comment on attachment 342184 [details]
Patch v1

Oh dear.  Older compilers don't realize this method doesn't return!
Comment 3 David Kilzer (:ddkilzer) 2018-06-07 10:36:16 PDT
Created attachment 342185 [details]
Patch v2
Comment 4 Saam Barati 2018-06-07 10:54:57 PDT
Comment on attachment 342185 [details]
Patch v2

View in context: https://bugs.webkit.org/attachment.cgi?id=342185&action=review

> Source/bmalloc/bmalloc/BCompiler.h:51
> +#if defined(_MSC_VER)
> +#define BCOMPILER_MSVC 1
> +#endif

Why do we care about this? We don't compile bmalloc on windows AFAIK.
Comment 5 David Kilzer (:ddkilzer) 2018-06-07 11:14:57 PDT
(In reply to Saam Barati from comment #4)
> Comment on attachment 342185 [details]
> Patch v2
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=342185&action=review
> 
> > Source/bmalloc/bmalloc/BCompiler.h:51
> > +#if defined(_MSC_VER)
> > +#define BCOMPILER_MSVC 1
> > +#endif
> 
> Why do we care about this? We don't compile bmalloc on windows AFAIK.

I was porting the WTF_NO_RETURN macro over will full fidelity.  If we don't compile bmalloc for Windows, then yes, we can leave this out.
Comment 6 David Kilzer (:ddkilzer) 2018-06-07 12:17:19 PDT
Created attachment 342199 [details]
Patch v3
Comment 7 WebKit Commit Bot 2018-06-07 14:05:35 PDT
Comment on attachment 342199 [details]
Patch v3

Clearing flags on attachment: 342199

Committed r232599: <https://trac.webkit.org/changeset/232599>
Comment 8 WebKit Commit Bot 2018-06-07 14:05:36 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Radar WebKit Bug Importer 2018-06-07 14:06:18 PDT
<rdar://problem/40909586>