I ran include-what-you-use on the Octave code base to get an idea of which
declarations are unnecessary and where we are in fact missing declarations.
The tool is very much imperfect, but I can see there are some problems that
could be corrected. Unfortunately, this will require manual review of the
results. For instance, the tool completely misunderstands that config.h is
always included and by extension oct-conf-post.h is also included. The
suggestion to remove config.h and add oct-conf-post.h should be ignored.
Because this is such a big job I am uploading the log file and asking that
anyone who has free time tackle a few files. Only by dividing up the work
can it all get done.
For reference, the Octave coding guidelines for the order of #includes is
C standard lib headers
C++ standard lib headers
Within each category the headers are alphabetized.
As an example, here is the list for libinterp/corefcn/__delaunayn__.cc
#if defined (HAVE_CONFIG_H)
# include "config.h"