Re:A Guide to Undefined Behavior in C and C++
by fluoridation on Thursday August 17, 2023 @07:28PM
(#37169671)
A reasonable compiler would let you turn off a specific warning for a section of code.
[ Parent
| on HN ]
Re:A Guide to Undefined Behavior in C and C++
by torstenvl on Thursday August 17, 2023 @11:54PM
(#37171233)
They pretty much all do.
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wwhatever"
// code
#pragma clang diagnostic pop
Re:A Guide to Undefined Behavior in C and C++
by fluoridation on Friday August 18, 2023 @03:05AM
(#37172226)
I was going to comment that GCC doesn't, but it seems it was added as some point since the last time I checked. I know at one time GCC had as a policy not to allow doing that.