Skip to content

Python/generated_cases.c.h emits compiler warnings #106797

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

Closed
corona10 opened this issue Jul 16, 2023 · 0 comments
Closed

Python/generated_cases.c.h emits compiler warnings #106797

corona10 opened this issue Jul 16, 2023 · 0 comments
Labels
type-bug An unexpected behavior, bug, or error

Comments

@corona10
Copy link
Member

corona10 commented Jul 16, 2023


In file included from Python/ceval.c:770:
Python/generated_cases.c.h:3463:51: warning: code will never be executed [-Wunreachable-code]
            if (1) { stack_pointer[-(1 + (1 ? 1 : 0))] = res2; }
                                                  ^
Python/generated_cases.c.h:3463:43: note: silence by adding parentheses to mark code as explicitly dead
            if (1) { stack_pointer[-(1 + (1 ? 1 : 0))] = res2; }
                                          ^
                                          /* DISABLES CODE */ ( )
Python/generated_cases.c.h:3437:58: warning: code will never be executed [-Wunreachable-code]
            if (0) { stack_pointer[-(1 + (0 ? 1 : 0))] = res2; }
                                                         ^~~~
Python/generated_cases.c.h:3437:17: note: silence by adding parentheses to mark code as explicitly dead
            if (0) { stack_pointer[-(1 + (0 ? 1 : 0))] = res2; }
                ^
                /* DISABLES CODE */ ( )
Python/generated_cases.c.h:3437:47: warning: code will never be executed [-Wunreachable-code]
            if (0) { stack_pointer[-(1 + (0 ? 1 : 0))] = res2; }
                                              ^
Python/generated_cases.c.h:3437:43: note: silence by adding parentheses to mark code as explicitly dead
            if (0) { stack_pointer[-(1 + (0 ? 1 : 0))] = res2; }
                                          ^
                                          /* DISABLES CODE */ ( )
Python/generated_cases.c.h:3415:58: warning: code will never be executed [-Wunreachable-code]
            if (0) { stack_pointer[-(1 + (0 ? 1 : 0))] = res2; }
                                                         ^~~~
Python/generated_cases.c.h:3415:17: note: silence by adding parentheses to mark code as explicitly dead
            if (0) { stack_pointer[-(1 + (0 ? 1 : 0))] = res2; }
                ^
                /* DISABLES CODE */ ( )
Python/generated_cases.c.h:3415:47: warning: code will never be executed [-Wunreachable-code]
            if (0) { stack_pointer[-(1 + (0 ? 1 : 0))] = res2; }
                                              ^
Python/generated_cases.c.h:3415:43: note: silence by adding parentheses to mark code as explicitly dead
            if (0) { stack_pointer[-(1 + (0 ? 1 : 0))] = res2; }
                                          ^
                                          /* DISABLES CODE */ ( )
Python/generated_cases.c.h:3387:51: warning: code will never be executed [-Wunreachable-code]
            if (1) { stack_pointer[-(1 + (1 ? 1 : 0))] = res2; }
                                                  ^
Python/generated_cases.c.h:3387:43: note: silence by adding parentheses to mark code as explicitly dead
            if (1) { stack_pointer[-(1 + (1 ? 1 : 0))] = res2; }
                                          ^
                                          /* DISABLES CODE */ ( )
Python/generated_cases.c.h:3365:51: warning: code will never be executed [-Wunreachable-code]
            if (1) { stack_pointer[-(1 + (1 ? 1 : 0))] = res2; }
                                                  ^
Python/generated_cases.c.h:3365:43: note: silence by adding parentheses to mark code as explicitly dead
            if (1) { stack_pointer[-(1 + (1 ? 1 : 0))] = res2; }
                                          ^
                                          /* DISABLES CODE */ ( )

Not a significant issue, but good to be fixed.

Linked PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants
@corona10 and others