On Mon, Jan 14, 2013 at 10:48 PM, Lucas De Marchi <
lucas.demar...@profusion.mobi> wrote:

> 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.
>
>
As Mike and I have said, warnings are useless if there's a warning clutter.
That's why we silence warnings that are obviously not bugs, we want
warnings to be important and visible. If the code is cluttered with
warnings they are not useful anymore. So if anything, this argument
supports what we've said.

-- 
Tom.
------------------------------------------------------------------------------
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of 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_122512
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to