abhi9u@lemmy.world to Technology@lemmy.worldEnglish · 20 hours agoWhy Git Has a Variable Named false_but_the_compiler_does_not_know_it_blog.codingconfessions.comexternal-linkmessage-square7fedilinkarrow-up161arrow-down16
arrow-up155arrow-down1external-linkWhy Git Has a Variable Named false_but_the_compiler_does_not_know_it_blog.codingconfessions.comabhi9u@lemmy.world to Technology@lemmy.worldEnglish · 20 hours agomessage-square7fedilink
minus-squareVenator@lemmy.nzlinkfedilinkEnglisharrow-up3·edit-215 hours agoactually not sure, as they do use #pragma GCC diagnostic ignored in a couple of places : https://github.com/git/git/blob/8d96f09e9245ddf80c1981476fcbac8c4bb4125f/compat/win32/headless.c#L14 https://github.com/git/git/blob/8d96f09e9245ddf80c1981476fcbac8c4bb4125f/compat/regex/regex.c#L20 but apparently that disables it for everything after that line in the file though: https://stackoverflow.com/questions/48426484/concise-way-to-disable-specific-warning-instances-in-clang#comment83878587_48426846 I think the second answer on that stackoverflow post might be better than false_but_the_compiler_does_not_know_it_ though…
actually not sure, as they do use
#pragma GCC diagnostic ignoredin a couple of places :https://github.com/git/git/blob/8d96f09e9245ddf80c1981476fcbac8c4bb4125f/compat/win32/headless.c#L14
https://github.com/git/git/blob/8d96f09e9245ddf80c1981476fcbac8c4bb4125f/compat/regex/regex.c#L20
but apparently that disables it for everything after that line in the file though:
https://stackoverflow.com/questions/48426484/concise-way-to-disable-specific-warning-instances-in-clang#comment83878587_48426846
I think the second answer on that stackoverflow post might be better than
false_but_the_compiler_does_not_know_it_though…