[New-bugs-announce] [issue36020] HAVE_SNPRINTF and MSVC std::snprintf support

palotasb-conti report at bugs.python.org
Mon Feb 18 05:18:26 EST 2019


New submission from palotasb-conti <boldizsar.palotas at continental-corporation.com>:

Abstract: pyerrors.h defines snprintf as a macro on MSVC even on versions of MSVC where this workaround causes bugs.

snprintf is defined as _snprintf in pyerrors.h, see: https://github.com/python/cpython/blob/ac28147e78c45a6217d348ce90ca5281d91f676f/Include/pyerrors.h#L326-L330

The conditions for this should exclude _MSC_VER >= 1900 where (std::)snprintf is correctly defined. Since this is not the case, subsequent user code that tries to use std::snprintf will fail with an err (_snprintf is not a member of namespace std).

----------
components: Windows
messages: 335803
nosy: palotasb-conti, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: HAVE_SNPRINTF and MSVC std::snprintf support
type: compile error
versions: Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36020>
_______________________________________


More information about the New-bugs-announce mailing list