Skip to content

[BUG] Warn when noexcept is ignored #5661

@da-woods

Description

@da-woods

Describe the bug

We should warn when noexcept is ignored - just to stop people thinking they're optimizing something that they aren't

Code to reproduce the behaviour:

cdef object xx() noexcept:
    pass

This also applies to memoryviews

Expected behaviour

This should generate a warning since exceptions are always checked for functions returning an object

OS

Linux

Python version

No response

Cython version

current master

Additional context

We might have to be a bit careful about fused functions - we probably don't want to generate warnings when some of the return types are valid for noexcept

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions