This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -Wall not detecting uninitialized variables


On 09/07/2011 05:34 PM, sudhakar govindavajhala wrote:
> #include <stdio.h>
> 
> int main() {
>         int i;
>         printf(" hi sud %d \n", i);
>         return 0;
> 
> }

zebedee:~ $ gcc --version
gcc (GCC) 4.5.1 20100924 (Red Hat 4.5.1-4)

zebedee:~ $ gcc -Wall t.c
t.c: In function 'main':
t.c:5:15: warning: 'i' is used uninitialized in this function


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]