@sharad
yeah. the code is giving warning as it should using the flag.
what flags are you using?
it might be the case that you haven't added up the -W and - Werror flags ..
On Sep 12, 2012 6:38 PM, "Sharad Birmiwal" <[email protected]> wrote:
>
>
>> static int abc = 0;
>>
>> static void do_work(void)
>> {
>> static int abc = 1; // An error will be generated here.
>> }
>>
>> void main(int argc, void **argv)
>> {
>> do_work();
>> }
>>
>>
> Did you try compiling this code? It compiles (gcc 4.4.x) just fine.
>
> As an aside, I suggest your main should return int and you use "char
> *argv[]" (see
> http://crasseux.com/books/**ctutorial/argc-and-argv.html<http://crasseux.com/books/ctutorial/argc-and-argv.html>for
> one).
>
> --
> Mailing list guidelines and other related articles:
> http://lug-iitd.org/Footer
>
--
Mailing list guidelines and other related articles: http://lug-iitd.org/Footer