Skip to content

Warnings about cfitsio compilation flags #9625

Description

@astrofrog

I'm seeing lots of warnings like:

warning: unknown warning option '-Wno-misleading-indentation'; did you mean '-Wno-binding-in-condition'? [-Wunknown-warning-option]
warning: unknown warning option '-Wno-format-overflow'; did you mean '-Wno-shift-overflow'? [-Wunknown-warning-option]

when compiling astropy - these occur when compiling cfitsio files. According to:

'-Wno-misleading-indentation', # gcc >~7.2

These are meant to be to prevent cfitsio warnings, but ironically the fact these flags are not recognized by my compiler causes a lot of warnings... My compiler here is:

% clang --version
Apple clang version 11.0.0 (clang-1100.0.33.12)
Target: x86_64-apple-darwin19.0.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

@mhvk - any idea how we could avoid these warnings? (since you added the flags)

Activity

  1. pllim commented on Nov 19, 2019

    @pllim
    Member

    I am gonna ping @jhunkeler too since he had dealt with such things for HSTCAL.

  2. mhvk commented on Nov 19, 2019

    @mhvk
    Contributor

    That's a long time ago - did I really do that?! But looking at the file, a bit above it, I see a clause

    setup_helpers.get_compiler_option() == 'msvc':
    

    So I think one could similarly split up the addition of compilation flags in clang and gcc specific sections.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions