Skip to content

gh-106797: Remove warning logs from Python/generated_cases.c.h and executor_cases.c.h #107889

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

Merged
merged 1 commit into from
Aug 12, 2023

Conversation

corona10
Copy link
Member

@corona10 corona10 commented Aug 12, 2023

It was detected during the PyCon KR sprint from the mentee's compiler.

@corona10
Copy link
Member Author

corona10 commented Aug 12, 2023

Compiler warn logs from PGO build

Python/generated_cases.c.h:3597:37: warning: code will never be executed [-Wunreachable-code]
            stack_pointer[-1 - (0 ? 1 : 0)] = attr;
                                    ^
Python/generated_cases.c.h:3597:33: note: silence by adding parentheses to mark code as explicitly dead
            stack_pointer[-1 - (0 ? 1 : 0)] = attr;
                                ^
                                /* DISABLES CODE */ ( )
Python/generated_cases.c.h:3577:37: warning: code will never be executed [-Wunreachable-code]
            stack_pointer[-1 - (0 ? 1 : 0)] = attr;
                                    ^
Python/generated_cases.c.h:3577:33: note: silence by adding parentheses to mark code as explicitly dead
            stack_pointer[-1 - (0 ? 1 : 0)] = attr;
                                ^
                                /* DISABLES CODE */ ( )
Python/generated_cases.c.h:2254:37: warning: code will never be executed [-Wunreachable-code]
            stack_pointer[-1 - (0 ? 1 : 0)] = attr;
                                    ^
Python/generated_cases.c.h:2254:33: note: silence by adding parentheses to mark code as explicitly dead
            stack_pointer[-1 - (0 ? 1 : 0)] = attr;
                                ^
                                /* DISABLES CODE */ ( )
In file included from Python/executor.c:84:
Python/executor_cases.c.h:1516:37: warning: code will never be executed [-Wunreachable-code]
            stack_pointer[-1 - (0 ? 1 : 0)] = attr;
                                    ^
Python/executor_cases.c.h:1516:33: note: silence by adding parentheses to mark code as explicitly dead
            stack_pointer[-1 - (0 ? 1 : 0)] = attr;
                                ^
                                /* DISABLES CODE */ ( )

Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@corona10 corona10 merged commit bf70774 into python:main Aug 12, 2023
@corona10 corona10 deleted the gh-106280-stack-index branch August 12, 2023 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants