With this line:
scanf("%d",&sec);
GCC knows that you initialize sec somewhere in your function.
As a separate step, GCC can do flow analysis to figure out whether you initialize sec before using it. Unfortunately, GCC will not always do the flow analysis you want, or even do flow analysis at all. Sometimes the flow analyis is done at a stage where the other information is not available. So, you cannot count on GCC to figure it out.
Other compilers will figure it out. For example,
~ $ clang-3.7 -c -Wall -Wextra -O2 ex.c
ex.c:11:25: warning: variable 'sec' is uninitialized when used here
[-Wuninitialized]
printf("sec = %d\n",sec);
^~~
ex.c:5:12: note: initialize the variable 'sec' to silence this warning
int sec,min,left;
^
= 0
1 warning generated.
It just so happens that GCC is very bad at detecting these errors.