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 warning "sqrtpi defined but not used" #74132

Closed
zhangyangyu opened this issue Mar 30, 2017 · 4 comments
Closed

compiler warning "sqrtpi defined but not used" #74132

zhangyangyu opened this issue Mar 30, 2017 · 4 comments
Labels
3.7 (EOL) end of life build The build process and cross-build

Comments

@zhangyangyu
Copy link
Member

BPO 29946
Nosy @rhettinger, @mdickinson, @serhiy-storchaka, @zhangyangyu, @mlouielu
PRs
  • bpo-29946: Fix "sqrtpi defined but not used" #908
  • 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 2017-03-31.03:22:25.253>
    created_at = <Date 2017-03-30.08:28:04.786>
    labels = ['build', '3.7']
    title = 'compiler warning "sqrtpi defined but not used"'
    updated_at = <Date 2017-03-31.03:22:25.252>
    user = 'https://github.com/zhangyangyu'

    bugs.python.org fields:

    activity = <Date 2017-03-31.03:22:25.252>
    actor = 'xiang.zhang'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-03-31.03:22:25.253>
    closer = 'xiang.zhang'
    components = ['Build']
    creation = <Date 2017-03-30.08:28:04.786>
    creator = 'xiang.zhang'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 29946
    keywords = []
    message_count = 4.0
    messages = ['290836', '290837', '290854', '290862']
    nosy_count = 6.0
    nosy_names = ['rhettinger', 'mark.dickinson', 'stutzbach', 'serhiy.storchaka', 'xiang.zhang', 'louielu']
    pr_nums = ['908']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue29946'
    versions = ['Python 3.7']

    @zhangyangyu
    Copy link
    Member Author

    Ubuntu 16.10, GCC 6.2.0

    /home/angwer/repos/cpython/Modules/mathmodule.c:74:21: warning: ‘sqrtpi’ defined but not used [-Wunused-const-variable=]
     static const double sqrtpi = 1.772453850905516027298167483341145182798;

    @zhangyangyu zhangyangyu added 3.7 (EOL) end of life build The build process and cross-build labels Mar 30, 2017
    @mlouielu
    Copy link
    Mannequin

    mlouielu mannequin commented Mar 30, 2017

    I can reproduce on ArchLinux 4.10.1-1, GCC 6.3.1:

    /home/louielu/Python/cpython/Modules/mathmodule.c:74:21: warning: ‘sqrtpi’ defined but not used [-Wunused-const-variable=]
     static const double sqrtpi = 1.772453850905516027298167483341145182798;

    Is used by m_erfc_contfrac and m_erf_series, and inside the block of "#if !defined(HAVE_ERF) || !defined(HAVE_ERFC)", maybe sqrtpi should do the same condition?

    @mdickinson
    Copy link
    Member

    This is almost certainly the result of bpo-26121.

    +1 to moving the sqrtpi definition inside the relevant #if blocks.

    @serhiy-storchaka
    Copy link
    Member

    New changeset 7a26464 by Serhiy Storchaka (Louie Lu) in branch 'master':
    bpo-29946: Fix "sqrtpi defined but not used" (#908)
    7a26464

    @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
    3.7 (EOL) end of life build The build process and cross-build
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants