New submission from Serhiy Storchaka <storchaka+cpyt...@gmail.com>:

It converts

    #if A
    ...
    #elif B
    ...
    #else
    ...
    #endif

into

    #if A
    ...
    #endif /* A */

    #if B
    ...
    #endif /* B */

    #if !B
    ...
    #endif /* !B */

The correct translation is:

    #if A
    ...
    #endif /* A */

    #if !A && B
    ...
    #endif /* !A && B */

    #if !A && !B
    ...
    #endif /* !A && !B */

----------
components: Argument Clinic, Build
messages: 365769
nosy: larry, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Argument Clinic incorretly translates #elif
type: compile error
versions: Python 3.7, Python 3.8, Python 3.9

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

Reply via email to