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

Define TARGET macro the same even when computed goto support is not enabled #88226

Closed
smontanaro opened this issue May 6, 2021 · 1 comment
Closed
Labels
3.12 bugs and security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement

Comments

@smontanaro
Copy link
Contributor

smontanaro commented May 6, 2021

BPO 44060
Nosy @smontanaro
PRs
  • bpo-44060: Enable TARGET labels even when not using computed gotos. #25949
  • 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 = None
    created_at = <Date 2021-05-06.15:09:57.774>
    labels = ['interpreter-core', 'type-feature', '3.11']
    title = 'Define TARGET macro the same even when computed goto support is not enabled'
    updated_at = <Date 2021-05-06.15:49:48.011>
    user = 'https://github.com/smontanaro'

    bugs.python.org fields:

    activity = <Date 2021-05-06.15:49:48.011>
    actor = 'skip.montanaro'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Interpreter Core']
    creation = <Date 2021-05-06.15:09:57.774>
    creator = 'skip.montanaro'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 44060
    keywords = ['patch']
    message_count = 1.0
    messages = ['393099']
    nosy_count = 1.0
    nosy_names = ['skip.montanaro']
    pr_nums = ['25949']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue44060'
    versions = ['Python 3.11']

    @smontanaro
    Copy link
    Contributor Author

    When the interpreter is compiled with computed goto support, the TARGET macro is defined like this:

    #define TARGET(op) op: TARGET_##op

    If computed gotos are disabled, the implementation is simpler:

    #define TARGET(op) op

    I'm finding it useful to use those labels as gdb breakpoint targets. Is there some reason not to always define the TARGET_##op label?

    @smontanaro smontanaro added 3.11 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement labels May 6, 2021
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    serhiy-storchaka pushed a commit that referenced this issue Nov 22, 2022
    …f computed gotos aren't enabled (GH-98265)
    
    Keep target labels when debugging, but don't warn about lack of use.
    
    Co-authored-by: Eryk Sun <eryksun@gmail.com>
    @serhiy-storchaka serhiy-storchaka added 3.12 bugs and security fixes and removed 3.11 only security fixes labels Nov 22, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.12 bugs and security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants