Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler warnings in longobject.c #48747

Closed
rhettinger opened this issue Dec 2, 2008 · 6 comments
Closed

Compiler warnings in longobject.c #48747

rhettinger opened this issue Dec 2, 2008 · 6 comments
Assignees
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs)

Comments

@rhettinger
Copy link
Contributor

BPO 4497
Nosy @rhettinger, @mdickinson
Files
  • issue4497.patch
  • 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 = 'https://github.com/mdickinson'
    closed_at = <Date 2008-12-05.17:27:46.029>
    created_at = <Date 2008-12-02.21:40:56.680>
    labels = ['interpreter-core']
    title = 'Compiler warnings in longobject.c'
    updated_at = <Date 2008-12-05.17:31:00.667>
    user = 'https://github.com/rhettinger'

    bugs.python.org fields:

    activity = <Date 2008-12-05.17:31:00.667>
    actor = 'mark.dickinson'
    assignee = 'mark.dickinson'
    closed = True
    closed_date = <Date 2008-12-05.17:27:46.029>
    closer = 'mark.dickinson'
    components = ['Interpreter Core']
    creation = <Date 2008-12-02.21:40:56.680>
    creator = 'rhettinger'
    dependencies = []
    files = ['12212']
    hgrepos = []
    issue_num = 4497
    keywords = ['patch']
    message_count = 6.0
    messages = ['76789', '76818', '76847', '76850', '77041', '77042']
    nosy_count = 2.0
    nosy_names = ['rhettinger', 'mark.dickinson']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue4497'
    versions = ['Python 3.0', 'Python 3.1']

    @rhettinger
    Copy link
    Contributor Author

    longobject.c
    ..\..\Objects\longobject.c(201) : warning C4244: '=' : conversion from
    'long' to 'digit', possible loss of data
    ..\..\Objects\longobject.c(212) : warning C4244: '=' : conversion from
    'long' to 'digit', possible loss of data
    ..\..\Objects\longobject.c(1063) : warning C4244: 'function' :
    conversion from '__int64' to 'int', possible loss of data
    ..\..\Objects\longobject.c(1106) : warning C4244: 'function' :
    conversion from 'unsigned __int64' to 'long', possible loss of data

    @rhettinger rhettinger added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Dec 2, 2008
    @mdickinson
    Copy link
    Member

    This is on Windows, right? I don't know of any other platforms where
    __int64 is defined.

    At a first glance, it looks as though the code's correct, so we probably
    just need to add some casts to silence the compiler. I'll add them to the
    patch in bpo-4393 and check it in sometime soon after 3.0 is released.

    @mdickinson
    Copy link
    Member

    Raymond, could you please try the attached patch to see if it silences the
    compiler?

    @rhettinger
    Copy link
    Contributor Author

    Yes, the compiler is happy now.

    @mdickinson
    Copy link
    Member

    Fixed in r67588 (py3k), r65789 (release30-maint).
    None of the fixes apply to 2.x.

    @mdickinson
    Copy link
    Member

    r65789
    That should be r67589.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    interpreter-core (Objects, Python, Grammar, and Parser dirs)
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants