New submission from Guido van Rossum <gu...@python.org>:

When building from scratch on Windows I get this warning:

c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winbase.h(103): 
warning C4005: 'Yield': macro redefinition 
[C:\Users\gvanrossum\cpython\PCbuild\pythoncore.vcxproj]

I know there is at least one place where we try to prevent this warning, e.g. 
in Include/internal/pycore_ast.h there's this line:

#undef Yield   /* undefine macro conflicting with <winbase.h> */

But apparently this isn't enough, or the error comes from a different file, or 
some rearrangement of header files made this #undef ineffective.

Victor, is it possible that your https://github.com/python/cpython/pull/24933 
reintroduced this warning?

Steve, what can I do to diagnose this better? (The warning doesn't tell me 
where winbase.h was included.)

----------
components: Windows
messages: 390462
nosy: gvanrossum, paul.moore, steve.dower, tim.golden, vstinner, zach.ware
priority: normal
severity: normal
stage: needs patch
status: open
title: Compiler arning about 'Yield' macro redefinition on Windows
type: compile error
versions: Python 3.10

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43767>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to