GeezerVison is showing github.com — gh-105059: Fix MSCV compiler warning on PyObject union by vstinner · Pull Request #107239 · python/cpython
Conversation
vstinner
commented
Jul 25, 2023
•
edited by bedevere-bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Use pragma to ignore the MSCV compiler warning on the PyObject nameless union.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Use pragma to ignore the MSCV compiler warning on the PyObject
nameless union.
|
@zooba: Would you be able to check if this change fix the compiler warning for you? These warnings: #105059 (comment)
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
I managed to reproduce the issue with this repro.c file:
#include <Python.h>
int main () {
return 0;
}
I open the "Developer Command Prompt", go Python source code directory, and type cl /c /I Include /I PC /W4 repro.c.
Output on the main branch:
Microsoft (R) C/C++ Optimizing Compiler Version 19.36.32537 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
repro.c
C:\victor\python\main\Include\object.h(178): warning C4201: nonstandard extension used: nameless struct/union
C:\victor\python\main\Include\cpython/unicodeobject.h(199): warning C4100: '_unused_op': unreferenced formal parameter
C:\victor\python\main\Include\cpython/unicodeobject.h(387): warning C4100: '_unused_op': unreferenced formal parameter
=> The warning C4201: nonstandard extension used: nameless struct/union warning is there.
Output with my PR:
Microsoft (R) C/C++ Optimizing Compiler Version 19.36.32537 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
repro.c
C:\victor\python\main\Include\cpython/unicodeobject.h(199): warning C4100: '_unused_op': unreferenced formal parameter
C:\victor\python\main\Include\cpython/unicodeobject.h(387): warning C4100: '_unused_op': unreferenced formal parameter
=> The waning is gone!
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️
Hi! The buildbot x86 Gentoo Installed with X 3.x has failed when building commit 1c8fe9b.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/464/builds/5113) and take a look at the build logs.
- Check if the failure is related to this commit (1c8fe9b) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/all/#builders/464/builds/5113
Failed tests:
- test.test_asyncio.test_subprocess
Failed subtests:
- test_subprocess_consistent_callbacks - test.test_asyncio.test_subprocess.SubprocessThreadedWatcherTests.test_subprocess_consistent_callbacks
Summary of the results of the build (if available):
== Tests result: FAILURE then FAILURE ==
429 tests OK.
1 test failed:
test.test_asyncio.test_subprocess
17 tests skipped:
test.test_asyncio.test_windows_events
test.test_asyncio.test_windows_utils test_asdl_parser test_clinic
test_devpoll test_gdb test_generated_cases test_ioctl test_kqueue
test_launcher test_perf_profiler test_startfile test_winconsoleio
test_winreg test_winsound test_wmi test_zipfile64
1 re-run test:
test.test_asyncio.test_subprocess
Total duration: 8 min 58 sec
Click to see traceback logs
Traceback (most recent call last):
File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.installed/build/target/lib/python3.13/test/test_asyncio/test_subprocess.py", line 788, in test_subprocess_consistent_callbacks
self.loop.run_until_complete(main())
File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.installed/build/target/lib/python3.13/asyncio/base_events.py", line 664, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.installed/build/target/lib/python3.13/test/test_asyncio/test_subprocess.py", line 780, in main
self.assertEqual(events, [
AssertionError: Lists differ: ['process_exited', ('pipe_data_received', 1, b'stdout')] != [('pipe_data_received', 1, b'stdout'), ('p[95 chars]ted']
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
jtcave
pushed a commit
to jtcave/cpython
that referenced
this pull request
Jul 27, 2023
…107239)
Use pragma to ignore the MSCV compiler warning on the PyObject
nameless union.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
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.
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.
|