-
-
Notifications
You must be signed in to change notification settings - Fork 419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implicit fallthrough warning on GCC 7.x #1581
Comments
@russel - Can you please let us know which |
Apologies, I should have been explicit. I am using Fedora Rawhide GCC which is now 7.0.1. |
https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html It looks like gcc 7 has added a default fallthrough warning behaviour. Note that it isn't present in gcc 6: https://gcc.gnu.org/onlinedocs/gcc-6.3.0/gcc/Warning-Options.html The default level (3) accepts various regular expressions as "fallthrough indicators", along with a gcc specific attribute. I suggest we pick one that level 4 also recognises, and add it in
|
@sylvanc @jemc Closing this was premature, I'm afraid. I pulled to bfb4b94 and then:
|
@russel if you could experiment with variations on the You can change the compiler build flags in the |
@jemc Rather than just play, I will get advice from a person/people who will know the answer off the top of their head(s). |
Try removing the hyphen, or removing the space i.e.
|
@jemc I took the - out, and everything compiles. I'll proffer a pull request. |
@jwakely Thanks for the data, much appreciated. |
Pull request #1585 is currently running the tests. |
Until this document is updated if will be helpful if it points to the IMO excellent Archlinux template building instructions.
Inspired by ponylang/ponyc#1581
* Travis: Support newer gcc versions In fact, run on both gcc 4.9, 5, 6 and 7. This is probably overkill in the long run. If it turns out to be a maintenance nightmare, we can drop one or more of these easily. * Attempt to fix warning w/ gcc 6 and 7. * Attempt to fix gcc-7 compile error Inspired by this: https://stackoverflow.com/questions/47981/how-do-you-set-clear-and-toggle-a-single-bit * TIL: Explicit case fallthrough More details: https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/ * Attempted workaround for -Wimplicit-fallthrough The comment approach did not work for me; the warning level seemed not to be 3 as it ought to be. Maybe if we explicitly set it to 4, things will work. * ARCH_CFLAGS was only being used when compiling chaos. Should be used when compiling the libraries and servers also. * Try level 3 instead. * One more try to get it working. * Googled for -Wimplicit-fallthrough This should work. The commment must be outside of the block, if it exists... * One more futile attempt to get it working w/ gcc-7 * One more try Inspired by ponylang/ponyc#1581
I have git master up-to-date as at 2017-02-14T08:13+00:00, with Fedora Rawhide fully up to date, and attempt to build Pony results in:
The text was updated successfully, but these errors were encountered: