New submission from Gregory P. Smith <g...@krypto.org>:
The correct C99 way to do this is using a char[]. PyBytesObject and unicode's struct encoding_map both do this. Unclear to me if we should backport this to earlier versions or not (because PyBytesObject may be exposed?) Probably, but I also doubt it is a big deal as compilers are generally not _yet_ making use of this detail AFAIK. ---------- assignee: gregory.p.smith components: Interpreter Core messages: 365349 nosy: gregory.p.smith priority: normal severity: normal stage: patch review status: open title: Undefined C behavior going beyond end of struct via a char[1]. type: compile error versions: Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40120> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com