Skip to content

New warning: missing braces around initializer [-Wmissing-braces] #115441

Description

@Eclips4

Bug report

Bug description:

Popped up in https://github.com/python/cpython/pull/115440/files

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

Activity

  1. colesbury commented on Feb 14, 2024

    @colesbury
    Contributor

    I think the warning started in #115329. It occurs in the non-debug default build.

    My guess is that the GCC doesn't like the definition of _py_object_state_INIT() anymore:

    # define _py_object_state_INIT(INTERP) \
    { 0 }

    cc @corona10

  2. colesbury commented on Feb 14, 2024

    @colesbury
    Contributor

    We can just remove _py_object_state_INIT completely and not explicitly initialize .object_state. Zero initialization is fine for that field.

  3. added 2 commits that reference this issue on Feb 14, 2024
  4. Eclips4 commented on Feb 14, 2024

    @Eclips4
    MemberAuthor

    Thanks Sam for fixing!

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-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions