Re: Feature request: Warning when .c file gets #include'd

2022-12-02 Thread Jonathan Wakely via Gcc
On Fri, 2 Dec 2022 at 15:47, Marek Polacek wrote: > > On Fri, Dec 02, 2022 at 03:57:44PM +0100, Jiří Wolker via Gcc wrote: > > > > Hi, > > > > I've met a guy that is learning C and got stuck when the linker produced > > a screenful of messages about that he did something define multiple > > times.

Re: Feature request: Warning when .c file gets #include'd

2022-12-02 Thread Marek Polacek via Gcc
On Fri, Dec 02, 2022 at 03:57:44PM +0100, Jiří Wolker via Gcc wrote: > > Hi, > > I've met a guy that is learning C and got stuck when the linker produced > a screenful of messages about that he did something define multiple > times. The cause of the problem was trivial: > > He did ``#include

Feature request: Warning when .c file gets #include'd

2022-12-02 Thread Jiří Wolker via Gcc
Hi, I've met a guy that is learning C and got stuck when the linker produced a screenful of messages about that he did something define multiple times. The cause of the problem was trivial: He did ``#include "something.c"'' in his code. In the past, I also did this thing multiple times and