Bug 186400 - bmalloc: Fix 'noreturn' warnings when compiling with -std=gnu++17
Summary: bmalloc: Fix 'noreturn' warnings when compiling with -std=gnu++17
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: bmalloc (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-06-07 10:01 PDT by David Kilzer (:ddkilzer)
Modified: 2018-06-07 14:06 PDT (History)
8 users (show)

See Also:


Attachments
Patch v1 (3.35 KB, patch)
2018-06-07 10:20 PDT, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff
Patch v2 (4.23 KB, patch)
2018-06-07 10:36 PDT, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff
Patch v3 (4.01 KB, patch)
2018-06-07 12:17 PDT, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>