Bug 43396

Summary: -Wflag checks give false positives with clang
Product: systemd Reporter: Michał Górny <mgorny>
Component: generalAssignee: Lennart Poettering <lennart>
Status: RESOLVED NOTOURBUG QA Contact:
Severity: trivial    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Michał Górny 2011-11-30 15:23:02 UTC
clang treats invalid -W options as warnings so all -W checks succeed with it. The result is:

^[[0;1;35mwarning: ^[[0m^[[1munknown warning option '-Wlogical-op' [-Wunknown-warning-option]^[[0m

for each file.

I suggest improving the test by either:

1) checking compiler output as well -- if compiler does not output any messages (warnings) then the option is supported,
2) check for -Werror first and then append it for other checks.
Comment 1 Lennart Poettering 2012-07-20 14:07:01 UTC
I am pretty sure that this is something to fix in clang, not systemd.
Comment 2 Lennart Poettering 2012-09-13 18:06:02 UTC
Closing, since I beliebe this should be fixed in clang, not systemd.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.