On Sun, 10 Aug 2025, 20:28 Basile Starynkevitch, <basile@xxxxxxxxxxxxxxxxx> wrote: > On Sun, 2025-08-10 at 23:38 +0530, Rajeev Bansal via Gcc-help wrote: > > Hello, > > > > I am working on a large C/C++ project compiled with GCC and am looking > for > > ways to identify unnecessary header files. I'm wondering if there's a > tool > > similar to `include-what-you-use` (IWYU) that can help with this > > information in gcc. > > > > Any advice or recommendations would be greatly appreciated. > > In addition of the previous reply, don't forget link time optimization and > precompiled headers in GCC. Sometimes both are improving things. > > Observe that even the optimization level is known (and used) in some Linux > system header files. > (so your goal depend upon the compilation options) > how is this answer related to the question?! >