Skip to content

Fail to build with tail cail optimization on Windows #141937

@winapiadmin

Description

@winapiadmin

Bug report

Bug description:

Building CPython with tail call optimization makes this error related to tail call optimization:

...
C:\cpython\Python\opcode_targets.h(282,38): error C2085: '_TAIL_CALL_BINARY_OP_SUBSCR_STR_INT': not in formal parameter list [C:\cpython\PCbuild\pythoncore.vcxproj]
C:\cpython\Python\opcode_targets.h(283,1): error C2061: syntax error: identifier '__attribute__' [C:\cpython\PCbuild\pythoncore.vcxproj]
C:\cpython\Python\opcode_targets.h(284,1): error C2143: syntax error: missing ')' before '(' [C:\cpython\PCbuild\pythoncore.vcxproj]
C:\cpython\Python\opcode_targets.h(284,1): error C2059: syntax error: ')' [C:\cpython\PCbuild\pythoncore.vcxproj]
C:\cpython\Python\opcode_targets.h(284,21): error C2143: syntax error: missing ')' before 'type' [C:\cpython\PCbuild\pythoncore.vcxproj]
C:\cpython\Python\opcode_targets.h(284,1): error C2091: function returns function [C:\cpython\PCbuild\pythoncore.vcxproj]
C:\cpython\Python\opcode_targets.h(284,38): error C2085: '_TAIL_CALL_BINARY_OP_SUBTRACT_FLOAT': not in formal parameter list [C:\cpython\PCbuild\pythoncore.vcxproj]
C:\cpython\Python\opcode_targets.h(285,1): error C2061: syntax error: identifier '__attribute__' [C:\cpython\PCbuild\pythoncore.vcxproj]
C:\cpython\Python\opcode_targets.h(286,1): error C2143: syntax error: missing ')' before '(' [C:\cpython\PCbuild\pythoncore.vcxproj]
C:\cpython\Python\opcode_targets.h(286,1): error C2059: syntax error: ')' [C:\cpython\PCbuild\pythoncore.vcxproj]
C:\cpython\Python\opcode_targets.h(286,21): error C2143: syntax error: missing ')' before 'type' [C:\cpython\PCbuild\pythoncore.vcxproj]
C:\cpython\Python\opcode_targets.h(286,1): error C2091: function returns function [C:\cpython\PCbuild\pythoncore.vcxproj]
C:\cpython\Python\opcode_targets.h(286,38): error C2085: '_TAIL_CALL_BINARY_SLICE': not in formal parameter list [C:\cpython\PCbuild\pythoncore.vcxproj]
C:\cpython\Python\opcode_targets.h(287,1): error C2061: syntax error: identifier '__attribute__' [C:\cpython\PCbuild\pythoncore.vcxproj]
C:\cpython\Python\opcode_targets.h(288,1): error C2143: syntax error: missing ')' before '(' [C:\cpython\PCbuild\pythoncore.vcxproj]
C:\cpython\Python\opcode_targets.h(288,1): error C2059: syntax error: ')' [C:\cpython\PCbuild\pythoncore.vcxproj]
C:\cpython\Python\opcode_targets.h(288,1): error C1003: error count exceeds 100; stopping compilation [C:\cpython\PCbuild\pythoncore.vcxproj]

While building without it works!

CPython versions tested on:

3.14

Operating systems tested on:

Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-windowsbuildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions