Giter VIP home page Giter VIP logo

Comments (7)

dot-asm avatar dot-asm commented on June 15, 2024

Here is the thing. One can spot this message on travis, but not on github actions, nor have I observed it myself. Provided that travis is using llvm 9, while I'm using 12, what does it mean? It's likely to mean that it was recognized as a bug in the compiler warning subsystem, which was fixed somewhere in between. You can ask how do we know that it wasn't simply removed from -Wall or -Wextra sets. Well, if I try to trigger it with explicit -Wmissing-braces, it's not there. Just in case for reference, C standard text explicitly describes this scenario as legitimate/permitted, there is no ambiguity to fall victim for. So what do we do? I for one generally advocate for not caving to compiler bugs. This is not an absolute black-or-white position, but it's definitely more "against" toward fixed bugs. In other words I would suggest to accept the harsh reality and adapt your build procedures to suppress the warning. Or upgrade to newer compiler version;-)

from blst.

Nashatyrev avatar Nashatyrev commented on June 15, 2024

Cool, thanks for investigation and detailed explanations 👍
Already adapted our build :)

from blst.

Nashatyrev avatar Nashatyrev commented on June 15, 2024

BTW may be worth adding a build troubleshooting section to note such cases there

from blst.

Nashatyrev avatar Nashatyrev commented on June 15, 2024

Just a note. The following option solves the issue (existing options + -Werror -Wno-missing-braces, didn't find a way to append an option)

./build.sh CFLAGS=-O -fno-builtin-memcpy -fPIC -Wall -Wextra -Werror -Wno-missing-braces

from blst.

dot-asm avatar dot-asm commented on June 15, 2024

What do you mean? ./build.sh -Wno-missing-braces should work, and it does for me... Well, there might be ambiguity. If you have CFLAGS environment variable set, and find it appropriate to override it when building specifically blst, then something similar to what you suggest would be a way to go. But it's not the only way. If I wanted to suppress project-specific CFLAGS and let ./build.sh decide, I'd simply start it as env CFLAGS= ./build.sh -What-ever instead.

Just in case, "you have CFLAGS environment variable set" is more likely to mean that it's set by some component of your build system during the build, and not like when you login.

from blst.

dot-asm avatar dot-asm commented on June 15, 2024

BTW may be worth adding a build troubleshooting section to note such cases there

Just in case, it's not bad idea per se, but making an arrangement to document just one quirk feels like an overdo. In other words, the current plan is to wait and see...

from blst.

Nashatyrev avatar Nashatyrev commented on June 15, 2024

./build.sh -Wno-missing-braces should work

Yep it does indeed. Thanks 👍

from blst.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.