Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-13983

Use -pedantic to enforce C++ standards compliance

    XMLWordPrintable

    Details

    • Type: Story
    • Status: In Progress
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: astshim, ndarray, sconsUtils
    • Labels:
      None

      Description

      Apparently gcc and clang only warn about using functionality from standards newer than the one specified with -std unless you pass -pedandic; we want those to be errors.

      I'll give this a shot myself initially, since it's a one-line change plus some Jenkins submissions.  I may pass it off to someone else if our code isn't already compliant (or very close to compliant).

        Attachments

          Issue Links

            Activity

            Hide
            krzys Krzysztof Findeisen added a comment -

            As I understand it, -pedantic just adds warnings; do we want -pedantic-errors?

            Show
            krzys Krzysztof Findeisen added a comment - As I understand it, -pedantic just adds warnings; do we want -pedantic-errors ?
            Hide
            jbosch Jim Bosch added a comment -

            I took the second clause of the first sentence here:

            -pedantic
            Issue all the warnings demanded by strict ISO C and ISO C++; reject all programs that use
            forbidden extensions, and some other programs that do not follow ISO C and ISO C++. For ISO C,
            follows the version of the ISO C standard specified by any -std option used.

            to mean that we'd errors if anything tried to use a forbidden extension.  I admit that I still don't understand the difference, but I'm happy to switch to -pedandic-errors.

            I have a mostly-complete Jenkins run that hasn't seen any problems yet from adding -pedantic (I fixed the afw problem that spurred the original discussion before starting, though, so I didn't see if it would have caught it).  If a run with -pedantic-errors does turn up some problems, that'd be an interesting data point.

            It seems like I should also try a run with just -pedantic and the afw fix removed to see if it catches it.

            Show
            jbosch Jim Bosch added a comment - I took the second clause of the first sentence here: -pedantic Issue all the warnings demanded by strict ISO C and ISO C++; reject all programs that use forbidden extensions, and some other programs that do not follow ISO C and ISO C++. For ISO C, follows the version of the ISO C standard specified by any -std option used. to mean that we'd errors if anything tried to use a forbidden extension.  I admit that I still don't understand the difference, but I'm happy to switch to -pedandic-errors . I have a mostly-complete Jenkins run that hasn't seen any problems yet from adding -pedantic (I fixed the afw problem that spurred the original discussion before starting, though, so I didn't see if it would have caught it).  If a run with -pedantic-errors  does turn up some problems, that'd be an interesting data point. It seems like I should also try a run with just -pedantic and the afw fix removed to see if it catches it.
            Hide
            jbosch Jim Bosch added a comment -

            Krzysztof Findeisen is right: -pedantic-errors is needed.  And enabling that does produce a number of errors, starting with astshim and ndarray (see _build.log).  I'm going to take this out of the current sprint, as it's more of a side-project than I can justify working on when I've got middleware things to do.  Anyone else is welcome to steal it if they (and their T/CAM) would like.

            Show
            jbosch Jim Bosch added a comment - Krzysztof Findeisen is right: -pedantic-errors is needed.  And enabling that does produce a number of errors, starting with astshim and ndarray (see  _build.log ).  I'm going to take this out of the current sprint, as it's more of a side-project than I can justify working on when I've got middleware things to do.  Anyone else is welcome to steal it if they (and their T/CAM) would like.

              People

              Assignee:
              jbosch Jim Bosch
              Reporter:
              jbosch Jim Bosch
              Watchers:
              Jim Bosch, Krzysztof Findeisen, Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:

                  Jenkins Builds

                  No builds found.