Skip to content
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

Build fails with gcc 7.3 (-Werror=implicit-fallthrough) #141

Open
marmarek opened this issue Mar 9, 2018 · 4 comments · May be fixed by #142
Open

Build fails with gcc 7.3 (-Werror=implicit-fallthrough) #141

marmarek opened this issue Mar 9, 2018 · 4 comments · May be fixed by #142

Comments

@marmarek
Copy link

marmarek commented Mar 9, 2018

Build fails with this error:

+ /home/user/.opam/mirage-ssh-agent/bin/ocamlfind ocamlc -g -ccopt '--std=c99' -ccopt -Wall -ccopt -Wextra -ccopt -Werror -ccopt -O3 -ccopt -DACCELERATE -ccopt -msse2 -ccopt -maes -package zarith -package sexplib -package ppx_sexp_conv -package cstruct -c src/native/aes/aesni.c
src/native/aes/aesni.c: In function ‘_nc_aesni_enc_blocks’:
src/native/aes/aesni.c:316:19: error: this statement may fall through [-Werror=implicit-fallthrough=]
   __blocked_loop (_nc_aesni_enc, _nc_aesni_enc8, src, dst, rk, rounds, blocks);
                   ^
src/native/aes/aesni.c:294:9: note: in definition of macro ‘__blocked_loop’
         f1 (__b (src, 6), __b (dst, 6), rk, rounds);         \
         ^~
src/native/aes/aesni.c:295:7: note: here
       case 6:                                                \
       ^
src/native/aes/aesni.c:316:3: note: in expansion of macro ‘__blocked_loop’
   __blocked_loop (_nc_aesni_enc, _nc_aesni_enc8, src, dst, rk, rounds, blocks);
   ^~~~~~~~~~~~~~
(...)
cc1: all warnings being treated as errors
Command exited with code 2.

The environment is Fedora 26, ocaml 4.05.0

marmarek added a commit to marmarek/ocaml-nocrypto that referenced this issue Mar 9, 2018
@pqwy
Copy link
Contributor

pqwy commented Mar 11, 2018

Hmm it seems that this bit never made it into a release.

Ok, there should be a release sooner rather than later.

@marmarek
Copy link
Author

IMHO it is useful warning to have. But feel free to close this PR if you want it disabled globally anyway.

@cfcs
Copy link

cfcs commented Mar 13, 2018

@pqwy A higher upper bound on cstruct would be nice in a future release too! (Since Cstruct has added/changed some new stuff over the past 13 months)

@pqwy
Copy link
Contributor

pqwy commented Mar 13, 2018

@cfcs Sure, it's a quick stop-gap measure since cstruct gained homegrown element access I'm not completely sure about.

hannesm pushed a commit to hannesm/ocaml-nocrypto that referenced this issue Jan 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants