GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Unreachable code warning in specialize.c · Issue #94021 · python/cpython

Unreachable code warning in specialize.c #94021

New issue
Copy link
New issue
Copy link
Closed
Closed
Unreachable code warning in specialize.c#94021
Copy link
Assignees
brandtbucher
Labels
3.11only security fixesonly security fixes3.12only security fixesonly security fixestype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@tiran
tiran
opened on Jun 20, 2022
Issue body actions

Bug report

Some versions of clang complain about unreachable code in specialize.c

cpython/Python/specialize.c

Lines 1911 to 1920 in 774ef28

#ifndef Py_STATS
_Py_SET_OPCODE(*instr, COMPARE_OP);
return;
#endif
if (next_opcode == EXTENDED_ARG) {
SPECIALIZATION_FAIL(COMPARE_OP, SPEC_FAIL_COMPARE_OP_EXTENDED_ARG);
goto failure;
}
SPECIALIZATION_FAIL(COMPARE_OP, SPEC_FAIL_COMPARE_OP_NOT_FOLLOWED_BY_COND_JUMP);
goto failure;

Python/specialize.c:1915:13: warning: code will never be executed [-Wunreachable-code]

The problem is trivial to fix.

Activity

  1. tiran
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    3.11only security fixesonly security fixes
    3.12only security fixesonly security fixes
    on Jun 20, 2022
  2. tiran
    assigned
    brandtbucher
    on Jun 20, 2022
  3. tiran
    added a commit that references this issue on Jun 20, 2022

    pythongh-94021: Address unreachable code warning in specialize code

    392918b
  4. miss-islington
    added 3 commits that reference this issue on Jun 21, 2022

    gh-94021: Address unreachable code warning in specialize code (GH-94022)

    77c839c

    pythongh-94021: Address unreachable code warning in specialize code (p…

    c95f960

    gh-94021: Address unreachable code warning in specialize code (GH-94022)

    2733c64
  5. kumaraditya303 commented on Jun 23, 2022

    @kumaraditya303
    kumaraditya303
    on Jun 23, 2022
    Contributor
    More actions

    Fixed by #94022

  6. kumaraditya303
    closed this as completedon Jun 23, 2022
  7. serhiy-storchaka
    added a commit that references this issue on Jun 26, 2022

    Revert 30935 defer bpo45162 to 312 (#94285)

    1ffde3e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @brandtbucher
    brandtbucher

Labels

3.11only security fixesonly security fixes3.12only security fixesonly security fixestype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.