Skip to content

Fix build with gcc 7#957

Merged
dschuff merged 1 commit intoWebAssembly:masterfrom
mmha:master
Mar 29, 2017
Merged

Fix build with gcc 7#957
dschuff merged 1 commit intoWebAssembly:masterfrom
mmha:master

Conversation

@mmha
Copy link
Copy Markdown
Contributor

@mmha mmha commented Mar 29, 2017

This PR changes two things:

  1. Add a missing <functional> include
  2. Put the // fallthrough comment after the closing bracket so the compiler does not emit a implicit fallthrough warning.

@dschuff
Copy link
Copy Markdown
Member

dschuff commented Mar 29, 2017

Thanks for the contribution!

  1. Can you please join the WebAssembly Community Group (https://www.w3.org/community/webassembly/, see also https://github.com/WebAssembly/design/blob/master/Contributing.md )
  2. Does gcc really issue warnings based on the location of comments?! didn't know that.

@mmha
Copy link
Copy Markdown
Contributor Author

mmha commented Mar 29, 2017

  1. Sorry, that was an oversight. I just registered.

  2. I think gcc requires the // fallthrough comment to be right before the next case label. I merely moved the comment out of the scope. Interestingly C++17's [[fallthrough]] and gcc's __attribute__ ((fallthrough)) can be put inside the scope.

@dschuff dschuff merged commit 114e4ce into WebAssembly:master Mar 29, 2017
@dschuff
Copy link
Copy Markdown
Member

dschuff commented Mar 29, 2017

Merged, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants