> On 10 Aug 2025, at 21:25, Hans Åberg <haberg_1@xxxxxxxxxx> wrote: > >> 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. Sorry, you probably want a way to identify which header files are required for the facilities used. That seems to be a hard problem because of recursive includes. For example, I saw C sources that used malloc and included a header malloc.h (or something), which is not present in general, as the correct one is stdlib.h; the latter calls the former.