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 — Implement Py_UNUSED() for Windows MSVC compiler · Issue #107249 · python/cpython

Implement Py_UNUSED() for Windows MSVC compiler #107249

New issue
Copy link
New issue
Copy link
Closed
Closed
Implement Py_UNUSED() for Windows MSVC compiler#107249
Copy link
Labels
type-featureA feature request or enhancementA feature request or enhancement

Description

@vstinner
vstinner
opened on Jul 25, 2023
Issue body actions

The Py_UNUSED() is not implemented for the Windows MSVC compiler.

Example with this function included by Python.h: see #107239 (comment)

static inline unsigned int
PyUnicode_IS_READY(PyObject* Py_UNUSED(op))
{ return 1; }

Without my change, building a C program with cl /W4 which just includes Python.h emits the warning:

Include\cpython/unicodeobject.h(199): warning C4100: '_unused_op': unreferenced formal parameter

With my change, no warnings are emitted!

Linked PRs

  • gh-107249: Implement Py_UNUSED() for MSVC #107250
  • [3.12] gh-107249: Implement Py_UNUSED() for MSVC (GH-107250) #127907

Activity

  1. vstinner
    added
    type-featureA feature request or enhancementA feature request or enhancement
    on Jul 25, 2023
  2. vstinner
    added 2 commits that reference this issue on Jul 25, 2023

    pythongh-107249: Implement Py_UNUSED() for MSVC

    b9cc3b6

    gh-107249: Implement Py_UNUSED() for MSVC (#107250)

    6a43cce
  3. sunmy2019
    closed this as completedon Jul 26, 2023
  4. jtcave
    added a commit that references this issue on Jul 27, 2023

    pythongh-107249: Implement Py_UNUSED() for MSVC (python#107250)

    f7f712e
  5. bdegreve
    added a commit that references this issue on Aug 15, 2024

    Suppress unreferenced '_unused_op' warning

    406ed45
  6. miss-islington
    added a commit that references this issue on Dec 13, 2024

    pythongh-107249: Implement Py_UNUSED() for MSVC (pythonGH-107250)

    3e904d1
  7. vstinner
    added a commit that references this issue on Dec 13, 2024

    [3.12] gh-107249: Implement Py_UNUSED() for MSVC (GH-107250) (#127907)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-featureA feature request or enhancementA feature request or enhancement

    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.