Skip to content

ast.c: end_col_offset may be used uninitialized in this function #80059

Closed

Description

@vstinner
BPO 35878
Nosy @vstinner, @ilevkivskyi, @emilyemorehouse
PRs
  • bpo-35878: Fix compiler warnings about end_col_offset and end_lineno #11735
  • bpo-35878: Fix compiler warnings about end_col_offset and end_lineno #11735
  • bpo-35878: Fix compiler warnings about end_col_offset and end_lineno #11735
  • 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 2019-02-10.15:40:20.022>
    created_at = <Date 2019-02-01.11:22:41.487>
    labels = ['interpreter-core', 'build', '3.8']
    title = 'ast.c: end_col_offset may be used uninitialized in this function'
    updated_at = <Date 2019-02-11.11:31:47.842>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2019-02-11.11:31:47.842>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-02-10.15:40:20.022>
    closer = 'levkivskyi'
    components = ['Interpreter Core']
    creation = <Date 2019-02-01.11:22:41.487>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 35878
    keywords = ['patch', 'patch', 'patch']
    message_count = 2.0
    messages = ['334670', '335208']
    nosy_count = 3.0
    nosy_names = ['vstinner', 'levkivskyi', 'emilyemorehouse']
    pr_nums = ['11735', '11735', '11735']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'compile error'
    url = 'https://bugs.python.org/issue35878'
    versions = ['Python 3.8']

    Activity

    1. vstinner commented on Feb 1, 2019

      @vstinner
      MemberAuthor

      https://buildbot.python.org/all/#builders/103/builds/2023

      There are many "end_col_offset may be used uninitialized in this function" warnings. Example:

      In file included from Python/ast.c:7:0:
      Python/ast.c: In function ‘ast_for_funcdef_impl’:
      ./Include/Python-ast.h:484:66: warning: ‘end_col_offset’ may be used uninitialized in this function [-Wmaybe-uninitialized]
       #define FunctionDef(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) _Py_FunctionDef(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
                                                                        ^~~~~~~~~~~~~~~
      Python/ast.c:1738:21: note: ‘end_col_offset’ was declared here
           int end_lineno, end_col_offset;
                           ^~~~~~~~~~~~~~
    2. added
      interpreter-core(Objects, Python, Grammar, and Parser dirs)
      buildThe build process and cross-build
      on Feb 1, 2019
    3. vstinner commented on Feb 11, 2019

      @vstinner
      MemberAuthor

      Ivan Levkivskyi fixed the warning with commit 181835d.

      I created bpo-35963 Python/symtable.c: warning: enumeration value ‘FunctionType_kind’ not handled in switch [-Wswitch]" for a remaining warning.

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

      3.8 (EOL)end of lifebuildThe build process and cross-buildinterpreter-core(Objects, Python, Grammar, and Parser dirs)

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions