Opened 7 years ago

Last modified 7 years ago

#19899 closed enhancement

Use -Wno-unused to compile Python + Python packages — at Initial Version

Reported by: Jeroen Demeyer Owned by:
Priority: major Milestone: sage-7.0
Component: packages: standard Keywords:
Cc: Merged in:
Authors: Jeroen Demeyer Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

Currently, the Sage is compiled with -w which suppresses all warnings. I don't think that is a good idea because there might be useful warnings.

One kind of warning which appears a lot is unused functions or variables because of the way that Cython generates code. Such warnings also appear in external Cython packages which use Sage. Therefore, we simply compile Python with -Wno-unused which is then passes down to all Python packages.

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 (0)

Note: See TracTickets for help on using tickets.