Bug 420611 - [suggestion]: add -Wundef to parser args (aka warning: 'KCONFIG_VERSION' is not defined, evaluates to 0 [-Wundef])
Summary: [suggestion]: add -Wundef to parser args (aka warning: 'KCONFIG_VERSION' is n...
Status: REPORTED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (Clang-based) (other bugs)
Version First Reported In: git master
Platform: Other All
: NOR wishlist
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-26 09:51 UTC by RJVB
Modified: 2020-04-26 09:51 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description RJVB 2020-04-26 09:51:36 UTC
In case (if not hope...) someone gets to this before me:

It would be useful to add -Wundef to the default compiler arguments used by the parser. Apparently this flag is not included in -Wall, and its absence leads to compiling warnings like

foo.c:N:5: warning: 'KCONFIG_VERSION' is not defined, evaluates to 0 [-Wundef]

which you just have to spot and which won't have any runtime repercussions if you're developing on a system where the version check is supposed to fail even if the version macro *is* defined.

I'm aware that you can also deduce the fact if a macro is defined from its colour when using the default code colour palette, but that is just about as easy as spotting the warning in a pile of compiler output.

(of course you can also wonder why KF5 framework headers don't include their version header like Qt headers do...)