Open GoogleCodeExporter opened 9 years ago
Thanks for the report, Marcin, it is a tricky use case. As far as I remember
IWYU doesn't look at warning flags and visibility attributes. It will be
interesting to try to fix this issue.
Do you have clang on your system? Because for me `clang StringTest.c
-Wmissing-declarations -Werror` doesn't show any errors. I wonder if clang and
gcc behave differently on this code.
Original comment by vsap...@gmail.com
on 10 Mar 2015 at 5:27
clang indeed shows nothing, so it's apparently behaving differently than gcc.
Maybe that's because clang's intention is not to duplicate additional gcc's
warnings (because they aren't breaking compilation), as they might be detected
with run of gcc - and clang is doing just error detection anyway. IWYU on the
other hand intends to modify source code and apparently there are compiler
flags that modify expectations on its output.
$ clang --version
Ubuntu clang version 3.4-1ubuntu3 (tags/RELEASE_34/final) (based on LLVM 3.4)
Target: x86_64-pc-linux-gnu
Thread model: posix
Original comment by mrzygloc...@gmail.com
on 10 Mar 2015 at 11:17
Thank you for testing it, Marcin. I don't know why clang and gcc have different
behaviour in this case, but it's useful to know.
Original comment by vsap...@gmail.com
on 14 Mar 2015 at 7:05
Original issue reported on code.google.com by
mrzygloc...@gmail.com
on 3 Mar 2015 at 1:16Attachments: