On Sat, 07.02.15 10:29, Thomas H.P. Andersen (pho...@gmail.com) wrote: > Hi, > > I am looking at ways to automatically trim the unnecessary includes. > One way to do it is a script[1] which simply tests if the compile > still works after removing each include one at a time. It does this in > reverse order for all includes in the .c files. Using -Werror we catch > any new warnings too.
I think this is quite useful, but I'd also be really careful with this. glibc versions sometimes require different headers to be included to get some functionality, thus automatic removal of headers that are unnecessary on one system doesn't mean this is universally the case... Moreover depdending on compile-time options you might different headers... Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel