Opened 22 months ago

Closed 22 months ago

Last modified 22 months ago

#28093 closed defect (duplicate)

Strip -Wstrict-prototypes from C++ cython extensions

Reported by: isuruf Owned by:
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: build Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

In conda, -Wstrict-prototypes is added to CFLAGS and therefore Cython C extensions are compiled with it. These flags are recorded and when a Cython C++ extension depends on C extension, these flags are used resulting a warning.

(C flags like -std=c99 is already stripped from C++ extensions, which means there is already infrastructure to do this.)

Change History (2)

comment:1 Changed 22 months ago by jdemeyer

  • Milestone changed from sage-8.9 to sage-duplicate/invalid/wontfix
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #25316

comment:2 in reply to: ↑ description Changed 22 months ago by jdemeyer

Replying to isuruf:

C flags like -std=c99 is already stripped from C++ extensions, which means there is already infrastructure to do this.

Unfortunately, this is not true. The flag -std=c99 is handled by Sage, so we can easily choose whether to add it or not. The flag -Wstrict-prototypes on the other hand is added by distutils itself, it's non-trivial to not add that flag.

I should also add that this has been fixed upstream in Python 3.6, but it looks like it won't be backported to 2.7.

Note: See TracTickets for help on using tickets.