http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58939
--- Comment #1 from chaselton <chaselton at gmail dot com> --- UPDATE: Thanks to Jonathan Wakely and Ian Taylor for providing the codefixes. This bug is resolved by adding the following to files.c in lines 715-726: if (regular && total != size && STAT_SIZE_RELIABLE (file->st)) cpp_error (pfile, CPP_DL_WARNING, "%s is shorter than expected", file->path); ++ off_t ot = file->st.st_size; file->buffer = _cpp_convert_input (pfile, CPP_OPTION (pfile, input_charset), buf, size + 16, total, &file->buffer_start, ++ &ot /*&file->st.st_size*/); ++ file->st.st_size = ot; file->buffer_valid = true; NOTE: The following also must be added to macro.c in order for libcpp to build successfully in lines 248-253: if (st) { ++ time_t t = (time_t) st->st_mtime; ++ tb = localtime (&t); /* tb = localtime (&st->st_mtime); */ }