Opened 6 years ago
Closed 6 years ago
#19899 closed enhancement (fixed)
Use -Wno-unused to compile Python + Python packages
Reported by: | jdemeyer | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-7.0 |
Component: | packages: standard | Keywords: | |
Cc: | Merged in: | ||
Authors: | Jeroen Demeyer | Reviewers: | Volker Braun |
Report Upstream: | N/A | Work issues: | |
Branch: | 0375847 (Commits, GitHub, GitLab) | Commit: | 0375847bf1688af6f59e83a0dcb8992a82413c80 |
Dependencies: | Stopgaps: |
Description (last modified by )
One kind of warning which appears a lot in Cython-generated code is unused functions or variables. Such warnings also appear in external Cython packages which use Sage. Therefore, this ticket proposes to compile Python with -Wno-unused
which is then passes down to all Python packages.
Currently, the Sage library is compiled with -w
which suppresses all warnings. I don't think that is a good idea because we might miss useful warnings. This ticket doesn't change that, but it will help to cut down the number of harmless "unused" warnings if we do change that.
I noticed something else strange: Python puts CFLAGS
before its own flags like -O3
. But there is also a variable EXTRA_CFLAGS
which is put after Python's flags. Since we usually want user flags to override the package flags, we put the user's CFLAGS
into EXTRA_CFLAGS
.
Change History (4)
comment:1 Changed 6 years ago by
- Branch set to u/jdemeyer/ticket/19899
comment:2 Changed 6 years ago by
- Commit set to 0375847bf1688af6f59e83a0dcb8992a82413c80
- Description modified (diff)
- Status changed from new to needs_review
comment:3 Changed 6 years ago by
- Reviewers set to Volker Braun
- Status changed from needs_review to positive_review
comment:4 Changed 6 years ago by
- Branch changed from u/jdemeyer/ticket/19899 to 0375847bf1688af6f59e83a0dcb8992a82413c80
- Resolution set to fixed
- Status changed from positive_review to closed
New commits:
Use -Wno-unused flag for Python