[New-bugs-announce] [issue12604] VTRACE macro in _sre.c should use do {} while (0)

Josh Triplett report at bugs.python.org
Thu Jul 21 22:38:14 CEST 2011


New submission from Josh Triplett <josh at joshtriplett.org>:

In _sre.c, the VTRACE macro normally gets defined to nothing.  It later gets used as the body of control structures such as "else" without braces, which causes many compilers to warn (to catch stray semicolons like "else;").  This makes it difficult to compile Python as part of a project which uses -Werror, such as GRUB.  Please consider defining VTRACE as do {} while(0) instead, as the standard convention for an empty function-like macro with no return value.

----------
messages: 140827
nosy: joshtriplett
priority: normal
severity: normal
status: open
title: VTRACE macro in _sre.c should use do {} while (0)
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12604>
_______________________________________


More information about the New-bugs-announce mailing list