On Tue, Jan 15, 2013 at 9:08 PM, Tom Hacohen <t...@stosb.com> wrote:
> On Mon, Jan 14, 2013 at 10: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.
>>
>
> I know this thread, I've read it before. I disagree with that statement
> though.


And for those of you to insist in disagreeing, go complaint to GCC devs now:

http://lwn.net/Articles/542920/
" In addition, -pedantic has been deprecated (in favor of -Wpedantic),
and -Wshadow has been fixed. -Wshadow now permits a common use-case
certain kernel developers have long complained was erroneously flagged
as invalid."

With a link to exactly the same thread I pointed out.

Lucas De Marchi

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to