Pacific++ 2017: Tom Isaacson "Equivalence in cross-compilation compiler warnings"

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ก.ค. 2024
  • Website: pacificplusplus.com/
    Resources: github.com/pacificplusplus/co...
    Twitter: / pacificplusplus
    Abstract:
    If you’re working on a codebase that’s compiled both on Windows with MSVC and Linux with gcc is it possible to make the build warnings equivalent? Or do you always have to run the risk of breaking the other build every time you do a commit?
    About the speaker:
    Known in Taiwan as "The Tom", he has spent most of his career in embedded development making machines that go ping in areas as diverse as TV broadcast equipment, automotive computers, in-car navigation devices, production software and marine electronics.
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 1

  • @mydeveloperday9069
    @mydeveloperday9069 6 ปีที่แล้ว +1

    This is a great talk
    Turning on "warnings as errors" in the developer builds but turning "warnings as error" off in a nightly build means your developers fix them as they add code but your nightly build is not compromised if someone locally turns that switch off.. but publish out the nightly build log and initially you'll see 1000s of warnings, which your can developers chip away at, you'll be amazed at how proud people can get at making their area warning free, before long you'll be beyond W3 and W4 and looking at the warnings Microsoft turns off and turning all those on too!
    You can also turn off individual warnings in visual studio you don't want with a compiler command line switch of /wdXXXX where XXXX is the warning number. (which I think was a question in this talk) - GCC and CLANG have similar "-W-no-XXXXXXX" switches were XXXXX is the name of the warning
    So a good practice is to turn them all on, then do a build and then turn off all the warnings that 3rd party/visual studio headers complain about, what you are left with is all the warnings less those that MS/others should be fixing! remember every time you upgrade VS to try that build again with them all turned on in case someone at Redmond did something good!
    To aid cross platform, write a script that your makefile/vs project runs before compiling that greps for #includes with "\" in... and make it echo out as if it were a warning, your culture will now be to fix all those too!
    Ultimately Ignoring warnings is like not brushing your teeth! at the end of the day something is going to smell!!