Skip to content

Compiler warnings in building Python 3.9 on Windows #87665

Closed

Description

@serhiy-storchaka
BPO 43499
Nosy @vstinner, @serhiy-storchaka, @ammaraskar
PRs
  • [3.9] bpo-43499: Silence compiler warnings about using legacy C API on Windows #24873
  • Restrict co_code to be under INT_MAX in codeobject #20628
  • bpo-39943: Fix MSVC warnings in sre extension #20508
  • bpo-41654: Fix compiler warning in MemoryError_dealloc() #22387
  • [3.9] bpo-43499: Restrict co_code to be under INT_MAX in codeobject (GH-20628) #24896
  • 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 2021-03-17.18:27:30.933>
    created_at = <Date 2021-03-15.12:12:03.640>
    labels = ['extension-modules', 'interpreter-core', '3.9']
    title = 'Compiler warnings in building Python 3.9 on Windows'
    updated_at = <Date 2021-03-17.18:27:30.932>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2021-03-17.18:27:30.932>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-03-17.18:27:30.933>
    closer = 'serhiy.storchaka'
    components = ['Extension Modules', 'Interpreter Core']
    creation = <Date 2021-03-15.12:12:03.640>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 43499
    keywords = ['patch']
    message_count = 6.0
    messages = ['388731', '388821', '388855', '388856', '388954', '388955']
    nosy_count = 3.0
    nosy_names = ['vstinner', 'serhiy.storchaka', 'ammar2']
    pr_nums = ['24873', '20628', '20508', '22387', '24896']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue43499'
    versions = ['Python 3.9']

    Activity

    1. serhiy-storchaka commented on Mar 15, 2021

      @serhiy-storchaka
      MemberAuthor

      Currently building Python 3.9 on Windows produce many compiler warnings. 3.8 and master are clean.

      • Warnings in the _sre module caused by the bug in MSVC (complains about automatic conversion of "void **" to "const void *"). Fixed by backporting PR20508.

      • Warnings in many files related to using legacy C API (e.g. PyUnicode_AsUnicode) in Windows specific code.

      • ..\Objects\exceptions.c(2313): warning C4098: 'MemoryError_dealloc': 'void' function returning a value

      • ..\Objects\frameobject.c(400): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data

      The last two may be hidden bugs.

    2. serhiy-storchaka commented on Mar 16, 2021

      @serhiy-storchaka
      MemberAuthor

      New changeset 651fc30 by Serhiy Storchaka in branch '3.9':
      bpo-43499: Silence compiler warnings about using legacy C API on Windows (GH-24873)
      651fc30

    3. serhiy-storchaka commented on Mar 16, 2021

      @serhiy-storchaka
      MemberAuthor

      Ammar Askar, do you mind to backport PR 20628 to 3.9? It is the only warning left, and it seems there is a potential bug.

    4. ammaraskar commented on Mar 16, 2021

      @ammaraskar
      Member

      Sure thing, I'll work on the backport.

    5. serhiy-storchaka commented on Mar 17, 2021

      @serhiy-storchaka
      MemberAuthor

      New changeset db73376 by Ammar Askar in branch '3.9':
      [3.9] bpo-43499: Restrict co_code to be under INT_MAX in codeobject (GH-20628) (GH-24896)
      db73376

    6. serhiy-storchaka commented on Mar 17, 2021

      @serhiy-storchaka
      MemberAuthor

      Thank you Ammar.

    7. 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

      Labels

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions