Advertisement
map_

Test gcc's -Wuninitialized

Dec 31st, 2013
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.23 KB | None | 0 0
  1.  
  2. // Compile with gcc -Wuninitialized
  3.  
  4. #include <stdio.h>
  5.  
  6. int main()
  7. {
  8.     int a = getchar();
  9.     int x;
  10.  
  11.     if (a <= 'Z') {
  12.         x = 'A';
  13.     }
  14.  
  15.     putchar(x); // Could warn, but doesn't (4.6.3)
  16.  
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement