GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-87092: avoid gcc warning on uninitialized struct field in assemble.c by corona10 · Pull Request #104460 · python/cpython

Conversation

@corona10

@corona10 corona10 commented May 14, 2023 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

I noticed the warn while I built CPython with GCC8 + PGO + LTO.


gcc -pthread -c -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall    -fno-semantic-interposition -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -g -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fvisibility=hidden -fprofile-use -fprofile-correction -I./Include/internal  -I. -I./Include    -DPy_BUILD_CORE -o Python/bltinmodule.o Python/bltinmodule.c
Python/assemble.c: In function ‘_PyAssemble_MakeCodeObject’:
Python/assemble.c:131:8: warning: ‘handler.h_preserve_lasti’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     if (handler->h_preserve_lasti) {
        ^
Python/assemble.c:147:34: note: ‘handler.h_preserve_lasti’ was declared here
     _PyCompile_ExceptHandlerInfo handler;
                                  ^~~~~~~
Python/assemble.c:132:15: warning: ‘handler.h_startdepth’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         depth -= 1;
         ~~~~~~^~~~
Python/assemble.c:147:34: note: ‘handler.h_startdepth’ was declared here
     _PyCompile_ExceptHandlerInfo handler;
                                  ^~~~~~~
  • Issue: Split compiler into code-gen, optimizer and assembler. #87092

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@corona10
no-issue: Remove gcc compiler warn for may be used uninitialized
4829961
@corona10
corona10 requested review from iritkatriel and markshannon as code owners May 14, 2023 01:47
@bedevere-bot bedevere-bot added the awaiting core review label May 14, 2023
@corona10 corona10 added skip issue skip news labels May 14, 2023
@corona10 corona10 changed the title no-issue: Remove gcc compiler warn for may be used uninitialized no-issue: Remove gcc compiler warn for assemble.c May 14, 2023
@corona10

corona10 commented May 14, 2023

Copy link
Copy Markdown
Member Author

Tests / Hypothesis Tests on Ubuntu (pull_request)

Unrelated to this PR: #22863 (comment)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@corona10 corona10 assigned iritkatriel May 14, 2023
iritkatriel
iritkatriel approved these changes May 14, 2023
View reviewed changes

@iritkatriel iritkatriel left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

corona10 reacted with heart emoji
All reactions
  • ❤️ 1 reaction
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting core review labels May 14, 2023
@iritkatriel iritkatriel changed the title no-issue: Remove gcc compiler warn for assemble.c gh-87092: avoid gcc warning on uninitialized struct field in assemble.c May 14, 2023
@iritkatriel iritkatriel removed the skip issue label May 14, 2023
@bedevere-bot bedevere-bot mentioned this pull request May 14, 2023
Split compiler into code-gen, optimizer and assembler. #87092
Closed
@iritkatriel
Merge branch 'main' into no-issue-remove-compiler-warn
48c9393
@iritkatriel
iritkatriel merged commit 178153c into python:main May 14, 2023
@bedevere-bot bedevere-bot removed the awaiting merge label May 14, 2023
@corona10
corona10 deleted the no-issue-remove-compiler-warn branch May 14, 2023 11:32
carljm added a commit to carljm/cpython that referenced this pull request May 15, 2023
@carljm
Merge branch 'main' into supermon
343867a
* main: (29 commits)
  pythongh-101819: Fix _io clinic input for unused base class method stubs (python#104418)
  pythongh-101819: Isolate `_io` (python#101948)
  Bump mypy from 1.2.0 to 1.3.0 in /Tools/clinic (python#104501)
  pythongh-104494: Update certain Tkinter pack/place tests for Tk 8.7 errors (python#104495)
  pythongh-104050: Run mypy on `clinic.py` in CI (python#104421)
  pythongh-104490: Consistently define phony make targets (python#104491)
  pythongh-67056: document that registering/unregistering an atexit func from within an atexit func is undefined (python#104473)
  pythongh-104487: PYTHON_FOR_REGEN must be minimum Python 3.10 (python#104488)
  pythongh-101282: move BOLT config after PGO (pythongh-104493)
  pythongh-104469 Convert _testcapi/float.c to use AC (pythongh-104470)
  pythongh-104456: Fix ref leak in _ctypes.COMError (python#104457)
  pythongh-98539: Make _SSLTransportProtocol.abort() safe to call when closed (python#104474)
  pythongh-104337: Clarify random.gammavariate doc entry  (python#104410)
  Minor improvements to typing docs (python#104465)
  pythongh-87092: avoid gcc warning on uninitialized struct field in assemble.c (python#104460)
  pythonGH-71383: IDLE - Document testing subsets of modules (python#104463)
  pythongh-104454: Fix refleak in AttributeError_reduce (python#104455)
  pythongh-75710: IDLE - add docstrings and comments to editor module (python#104446)
  pythongh-91896: Revert some very noisy DeprecationWarnings for `ByteString` (python#104424)
  Add a mention of PYTHONBREAKPOINT to breakpoint() docs (python#104430)
  ...
carljm added a commit to carljm/cpython that referenced this pull request May 15, 2023
@carljm
Merge branch 'main' into cached_property_docs
452d9f5
* main: (204 commits)
  pythongh-101819: Fix _io clinic input for unused base class method stubs (python#104418)
  pythongh-101819: Isolate `_io` (python#101948)
  Bump mypy from 1.2.0 to 1.3.0 in /Tools/clinic (python#104501)
  pythongh-104494: Update certain Tkinter pack/place tests for Tk 8.7 errors (python#104495)
  pythongh-104050: Run mypy on `clinic.py` in CI (python#104421)
  pythongh-104490: Consistently define phony make targets (python#104491)
  pythongh-67056: document that registering/unregistering an atexit func from within an atexit func is undefined (python#104473)
  pythongh-104487: PYTHON_FOR_REGEN must be minimum Python 3.10 (python#104488)
  pythongh-101282: move BOLT config after PGO (pythongh-104493)
  pythongh-104469 Convert _testcapi/float.c to use AC (pythongh-104470)
  pythongh-104456: Fix ref leak in _ctypes.COMError (python#104457)
  pythongh-98539: Make _SSLTransportProtocol.abort() safe to call when closed (python#104474)
  pythongh-104337: Clarify random.gammavariate doc entry  (python#104410)
  Minor improvements to typing docs (python#104465)
  pythongh-87092: avoid gcc warning on uninitialized struct field in assemble.c (python#104460)
  pythonGH-71383: IDLE - Document testing subsets of modules (python#104463)
  pythongh-104454: Fix refleak in AttributeError_reduce (python#104455)
  pythongh-75710: IDLE - add docstrings and comments to editor module (python#104446)
  pythongh-91896: Revert some very noisy DeprecationWarnings for `ByteString` (python#104424)
  Add a mention of PYTHONBREAKPOINT to breakpoint() docs (python#104430)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@iritkatriel iritkatriel iritkatriel approved these changes
@markshannon markshannon Awaiting requested review from markshannon markshannon is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@iritkatriel iritkatriel

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@corona10 @iritkatriel @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.