Skip to content

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

Merged
corona10 merged 1 commit into
python:mainfrom
corona10:gh-106280-stack-index
Aug 12, 2023
Merged

gh-106797: Remove warning logs from Python/generated_cases.c.h and executor_cases.c.h#107889
corona10 merged 1 commit into
python:mainfrom
corona10:gh-106280-stack-index

Conversation

@corona10

@corona10corona10 commented Aug 12, 2023

Copy link
Copy Markdown
Member

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

@corona10

corona10 commented Aug 12, 2023

Copy link
Copy Markdown
MemberAuthor

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 */ ( )

@gvanrossumgvanrossum left a comment

Copy link
Copy Markdown
Member

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:mainAug 12, 2023
@corona10
corona10 deleted the gh-106280-stack-index branch August 12, 2023 19:36
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@corona10@gvanrossum@bedevere-bot