------- Comment #2 from pinskia at gcc dot gnu dot org 2009-10-12 20:04 ------- Just to expand on that, fopen might change errno and it also it might return NULL which case fgetc might cause the program to seg fault. etc.
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41682