On Wed, Dec 21, 2016 at 12:05 PM, FX <fxcoud...@gmail.com> wrote: > The attached patch removes some unused headers from libgfortran sources. It > removes 320 assert.h, 31 stdlib.h, 12 string.h, 4 errno.h, and the occasional > math.h, unistd.h, and limits.h. > > I have audited all files manually, checking for function calls. Patch was > bootstrapped and regtested on x86_64-apple-darwin16.3.0. > OK to commit?
Ok. Watch out for regressions on other targets though. I have more than once caused regressions by using some function that happened to be included in the existing headers on glibc, but needed some other header on other targets. > PS: after that patch, the most often used header (not included in > libgfortran.h) is stdlib.h, used in 351 out of 436 library source files. > Maybe that warrants including it in libgfortran.h? (next are string.h with > 129 includes and limits.h with 113) Yes, sounds reasonable to include stdlib.h, yes. I have occasionally thought about splitting libgfortran.h, it's annoying when one does some minor change affecting maybe 1 or 2 .o files, but the entire libgfortran has to be rebuilt.. But beyond being annoyed, I haven't done anything further about it. -- Janne Blomqvist