|
From: | Tim Rühsen |
Subject: | Re: Including config.h emits warnings from -Wundef |
Date: | Fri, 4 Aug 2023 11:03:05 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.1 |
On 8/3/23 20:56, Jeffrey Walton wrote:
My personal opinion is, there's nothing to fix. That is exactly how macros are supposed to work. Anything undefined evaluates to 0. It has been that way since the early days of C and C++. If there's a fix, then it is that you don't use -Wundef.
-Wundef helps to find typos if #ifdef constructs quickly.Without it you easily end up debugging issues that the compiler could have caught at compile time. This actually happened to me in the past, I'd like to take this kind of issue out of the game once and for all :).
Regards, Tim
OpenPGP_signature
Description: OpenPGP digital signature
[Prev in Thread] | Current Thread | [Next in Thread] |