flintlib / python-flint

Python bindings for Flint and Arb
MIT License
129 stars 24 forks source link

Cython warnings during compilation #186

Open GiacomoPope opened 1 month ago

GiacomoPope commented 1 month ago

When compiling I get a bunch of errors like this

src/flint/types/fq_default.c:26171:21: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
                    CYTHON_FALLTHROUGH;
                    ^
src/flint/types/fq_default.c:566:34: note: expanded from macro 'CYTHON_FALLTHROUGH'
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
                                 ^
src/flint/types/fq_default.c:26182:21: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
                    CYTHON_FALLTHROUGH;
                    ^
src/flint/types/fq_default.c:566:34: note: expanded from macro 'CYTHON_FALLTHROUGH'
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
                                 ^
src/flint/types/fq_default.c:26387:21: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
                    CYTHON_FALLTHROUGH;
                    ^
src/flint/types/fq_default.c:566:34: note: expanded from macro 'CYTHON_FALLTHROUGH'
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
                                 ^
src/flint/types/fq_default.c:26398:21: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
                    CYTHON_FALLTHROUGH;
                    ^
src/flint/types/fq_default.c:566:34: note: expanded from macro 'CYTHON_FALLTHROUGH'
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
                                 ^
src/flint/types/fq_default.c:26848:13: warning: code will never be executed [-Wunreachable-code]
            goto bad;

is this something we can fix? I don't know if this is just on my machine or a generic issue

oscarbenjamin commented 1 month ago

I only see this one on Linux with gcc:

src/flint/types/fq_default.c:26848:13: warning: code will never be executed [-Wunreachable-code]
            goto bad;

I think it is new since a recent version of Cython.