On Mon, Jan 14, 2013 at 8:33 PM, Lucas De Marchi <lucas.demar...@profusion.mobi> wrote: > On Mon, Jan 14, 2013 at 6:32 PM, Tom Hacohen <t...@stosb.com> wrote: >> How is this a bug in the compiler? >> bla = func_name; >> and >> bla = var_name; >> are both valid C statements, it's a bug if they "fixed" it. > > both are valid, not together... what are you trying to do here? > > I am not saying -Wshadow is useless. In the snippet below the warning > is valid (and GCC 4.7 correctly warns about it): > > int f(void) > { > return 0; > } > > int main(void) > { > int f = 0; > return f++; > } > > However in the following snippet there's no way the programmer would > be confused about signal: > > #include <signal.h> > > int main(void) > { > int signal = 0; > > return signal; > } > > > signal is a pointer to a function that lives in another TU. What I am > saying is essentially the same Linus said on his email I pointed out. > > >> >> Furthermore, as mike said, it does no harm, and having a warning free >> compilation is very important. > > sure. and I agreed with the exception of useless warnings. For > example, here with gcc 4.7 I didn't have the problem he "fixed". > > >> >> unused-parameter is a very useful warning, I wouldn't ignore it if I were >> you. > > What am I missing? Do you have an example in real world that turning > this warning on discovered a bug? I never saw one. And this was > after turning it on on projects that previously didn't have it.
Btw, if you want a large code base to test the hypothesis that this indeed reveals real bugs, I suggest you to remove the -Wno-unused-parameter from systemd's configure.ac or from kernel's Makefile. Lucas De Marchi ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122412 _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel