Skip to content

gcc 10 emits warning for unused function: _xxsubinterpretersmodule #84793

Description

@corona10
BPO 40613
Nosy @vstinner, @ericsnowcurrently, @corona10
PRs
  • bpo-40613: Remove compiler warning from _xxsubinterpretersmodule #20069
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2020-05-13.13:39:53.782>
    created_at = <Date 2020-05-13.06:26:16.167>
    labels = ['expert-C-API', 'type-feature', '3.9']
    title = 'gcc 10 emits warning for unused function: _xxsubinterpretersmodule'
    updated_at = <Date 2020-05-14.16:46:31.529>
    user = 'https://github.com/corona10'

    bugs.python.org fields:

    activity = <Date 2020-05-14.16:46:31.529>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-05-13.13:39:53.782>
    closer = 'corona10'
    components = ['C API']
    creation = <Date 2020-05-13.06:26:16.167>
    creator = 'corona10'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 40613
    keywords = ['patch']
    message_count = 5.0
    messages = ['368762', '368777', '368783', '368784', '368848']
    nosy_count = 3.0
    nosy_names = ['vstinner', 'eric.snow', 'corona10']
    pr_nums = ['20069']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue40613'
    versions = ['Python 3.9']

    Activity

    1. corona10 commented on May 13, 2020

      @corona10
      MemberAuthor

      /oss/cpython/Modules/_xxsubinterpretersmodule.c:1089:1: warning: ‘_sharedexception_is_clear’ defined but not used [-Wunused-function]
      1089 | _sharedexception_is_clear(_sharedexception *she)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~
      /oss/cpython/Modules/_xxsubinterpretersmodule.c:601:1: warning: ‘_tbsnapshot_is_clear’ defined but not used [-Wunused-function]
      601 | _tbsnapshot_is_clear(_tbsnapshot *tbs)
      | ^~~~~~~~~~~~~~~~~~~~

      Both functions are used by the assert statement.
      IMHO, it should be replaced by if statement.

    2. changed the title [-]gcc 10 emits error for unused function: _xxsubinterpretersmodule[/-] [+]gcc 10 emits warning for unused function: _xxsubinterpretersmodule[/+] on May 13, 2020
    3. changed the title [-]gcc 10 emits error for unused function: _xxsubinterpretersmodule[/-] [+]gcc 10 emits warning for unused function: _xxsubinterpretersmodule[/+] on May 13, 2020
    4. vstinner commented on May 13, 2020

      @vstinner
      Member

      The two functions are only used in assertions. They should be surrounded by "#ifndef NDEBUG (...) #endif".

    5. corona10 commented on May 13, 2020

      @corona10
      MemberAuthor

      New changeset fa0a66e by Dong-hee Na in branch 'master':
      bpo-40613: Remove compiler warning from _xxsubinterpretersmodule (GH-20069)
      fa0a66e

    6. corona10 commented on May 13, 2020

      @corona10
      MemberAuthor

      The issue is now fixed.
      The PR was tested by me and Victor.

      Thanks for the suggestion and review Victor!

    7. vstinner commented on May 14, 2020

      @vstinner
      Member

      New changeset f2c3b68 by Victor Stinner in branch 'master':
      Revert "bpo-32604: [_xxsubinterpreters] Propagate exceptions. (GH-19768)" (GH-20089)
      f2c3b68

    8. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions