* Reporting unnecessary inclusion of header files. @ 2024-01-17 23:46 Rajeev Bansal 2024-01-18 9:02 ` Jonathan Wakely 0 siblings, 1 reply; 5+ messages in thread From: Rajeev Bansal @ 2024-01-17 23:46 UTC (permalink / raw) To: gcc-help [-- Attachment #1: Type: text/plain, Size: 224 bytes --] Hi All, I am looking for someone help on header file inclusion in C/CPP code. Can gcc help me to report the unnecessary inclusion of header files in my project? If not what are the other ways I can do it? Thanks, -Rajeev ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Reporting unnecessary inclusion of header files. 2024-01-17 23:46 Reporting unnecessary inclusion of header files Rajeev Bansal @ 2024-01-18 9:02 ` Jonathan Wakely 2024-01-18 9:18 ` Rajeev Bansal 0 siblings, 1 reply; 5+ messages in thread From: Jonathan Wakely @ 2024-01-18 9:02 UTC (permalink / raw) To: Rajeev Bansal; +Cc: gcc-help [-- Attachment #1: Type: text/plain, Size: 408 bytes --] On Wed, 17 Jan 2024, 23:47 Rajeev Bansal via Gcc-help, <gcc-help@gcc.gnu.org> wrote: > Hi All, > > I am looking for someone help on header file inclusion in C/CPP code. Can > gcc help me to report the unnecessary inclusion of header files in my > project? If not what are the other ways I can do it? > No, gcc can't help with this. But there's a clang-based tool for it: https://include-what-you-use.org/ ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Reporting unnecessary inclusion of header files. 2024-01-18 9:02 ` Jonathan Wakely @ 2024-01-18 9:18 ` Rajeev Bansal 2024-01-18 9:37 ` Jonathan Wakely 0 siblings, 1 reply; 5+ messages in thread From: Rajeev Bansal @ 2024-01-18 9:18 UTC (permalink / raw) To: Jonathan Wakely; +Cc: gcc-help [-- Attachment #1: Type: text/plain, Size: 720 bytes --] Thanks Jonathan. I have C++ code as well in my project, it looks like iwyu is compatible with llvm+clang compiler, any idea it will work with gcc as well? Thanks, -Rajeev On Thu, Jan 18, 2024 at 2:33 PM Jonathan Wakely <jwakely.gcc@gmail.com> wrote: > > > On Wed, 17 Jan 2024, 23:47 Rajeev Bansal via Gcc-help, < > gcc-help@gcc.gnu.org> wrote: > >> Hi All, >> >> I am looking for someone help on header file inclusion in C/CPP code. Can >> gcc help me to report the unnecessary inclusion of header files in my >> project? If not what are the other ways I can do it? >> > > No, gcc can't help with this. But there's a clang-based tool for it: > https://include-what-you-use.org/ > > > > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Reporting unnecessary inclusion of header files. 2024-01-18 9:18 ` Rajeev Bansal @ 2024-01-18 9:37 ` Jonathan Wakely 2024-01-18 9:40 ` Rajeev Bansal 0 siblings, 1 reply; 5+ messages in thread From: Jonathan Wakely @ 2024-01-18 9:37 UTC (permalink / raw) To: Rajeev Bansal; +Cc: gcc-help [-- Attachment #1: Type: text/plain, Size: 999 bytes --] On Thu, 18 Jan 2024, 09:18 Rajeev Bansal, <connectrajeev@gmail.com> wrote: > Thanks Jonathan. I have C++ code as well in my project, it looks like iwyu > is compatible with llvm+clang compiler, any idea it will work with gcc as > well? > I'm not sure what you mean. As I said, it is a clang-based tool. It works with both C and C++. No, it won't work with GCC. It uses clang libraries. > Thanks, > -Rajeev > > On Thu, Jan 18, 2024 at 2:33 PM Jonathan Wakely <jwakely.gcc@gmail.com> > wrote: > >> >> >> On Wed, 17 Jan 2024, 23:47 Rajeev Bansal via Gcc-help, < >> gcc-help@gcc.gnu.org> wrote: >> >>> Hi All, >>> >>> I am looking for someone help on header file inclusion in C/CPP code. >>> Can >>> gcc help me to report the unnecessary inclusion of header files in my >>> project? If not what are the other ways I can do it? >>> >> >> No, gcc can't help with this. But there's a clang-based tool for it: >> https://include-what-you-use.org/ >> >> >> >> ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Reporting unnecessary inclusion of header files. 2024-01-18 9:37 ` Jonathan Wakely @ 2024-01-18 9:40 ` Rajeev Bansal 0 siblings, 0 replies; 5+ messages in thread From: Rajeev Bansal @ 2024-01-18 9:40 UTC (permalink / raw) To: Jonathan Wakely; +Cc: gcc-help [-- Attachment #1: Type: text/plain, Size: 1226 bytes --] Never mind, I got the answer I was looking for. Thanks for your help. Thanks, -Rajeev On Thu, Jan 18, 2024 at 3:08 PM Jonathan Wakely <jwakely.gcc@gmail.com> wrote: > > > On Thu, 18 Jan 2024, 09:18 Rajeev Bansal, <connectrajeev@gmail.com> wrote: > >> Thanks Jonathan. I have C++ code as well in my project, it looks like >> iwyu is compatible with llvm+clang compiler, any idea it will work with gcc >> as well? >> > > > I'm not sure what you mean. As I said, it is a clang-based tool. It works > with both C and C++. > > No, it won't work with GCC. It uses clang libraries. > > >> Thanks, >> -Rajeev >> >> On Thu, Jan 18, 2024 at 2:33 PM Jonathan Wakely <jwakely.gcc@gmail.com> >> wrote: >> >>> >>> >>> On Wed, 17 Jan 2024, 23:47 Rajeev Bansal via Gcc-help, < >>> gcc-help@gcc.gnu.org> wrote: >>> >>>> Hi All, >>>> >>>> I am looking for someone help on header file inclusion in C/CPP code. >>>> Can >>>> gcc help me to report the unnecessary inclusion of header files in my >>>> project? If not what are the other ways I can do it? >>>> >>> >>> No, gcc can't help with this. But there's a clang-based tool for it: >>> https://include-what-you-use.org/ >>> >>> >>> >>> ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-01-18 9:40 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2024-01-17 23:46 Reporting unnecessary inclusion of header files Rajeev Bansal 2024-01-18 9:02 ` Jonathan Wakely 2024-01-18 9:18 ` Rajeev Bansal 2024-01-18 9:37 ` Jonathan Wakely 2024-01-18 9:40 ` Rajeev Bansal
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).