octave-task-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-task-tracker] [task #14501] Review #include declarations in code


From: Rik
Subject: [Octave-task-tracker] [task #14501] Review #include declarations in code base
Date: Tue, 2 May 2017 13:11:18 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0

URL:
  <http://savannah.gnu.org/task/?14501>

                 Summary: Review #include declarations in code base
                 Project: GNU Octave
            Submitted by: rik5
            Submitted on: Tue 02 May 2017 10:11:17 AM PDT
         Should Start On: Tue 02 May 2017 12:00:00 AM PDT
   Should be Finished on: Tue 01 Aug 2017 12:00:00 AM PDT
                Category: Wish
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
           Fixed Release: None
         Planned Release: None

    _______________________________________________________

Details:

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 are that the order of includes is


config.h

C standard lib headers

C++ standard lib headers

liboctave headers

other 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"
#endif

#include <cstdio>

#include <limits>
#include <string>

#include "Array.h"
#include "dMatrix.h"
#include "dRowVector.h"
#include "oct-locbuf.h"
#include "unwind-prot.h"

#include "defun-dld.h"
#include "error.h"
#include "errwarn.h"
#include "ovl.h"








    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/task/?14501>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]