> On 10 Aug 2025, at 20:08, Rajeev Bansal via Gcc-help <gcc-help@xxxxxxxxxxx> wrote: > > 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. The option -M writes out all dependencies, and one can then check whether a listed include file is in this list: gcc -M FILE | grep INCLUDE There might be other options. See: https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html