Bug 43396 - -Wflag checks give false positives with clang
Summary: -Wflag checks give false positives with clang
Status: RESOLVED NOTOURBUG
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium trivial
Assignee: Lennart Poettering
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-30 15:23 UTC by Michał Górny
Modified: 2012-09-13 18:06 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

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.