bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cpp cannot test macros containing a cast like A_STANDOUT


From: Nicolas Boulenguez
Subject: cpp cannot test macros containing a cast like A_STANDOUT
Date: Wed, 22 Jan 2014 16:11:08 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

Hello.

Latest curses.h (5.9+20140118) modifies the definition of A_STANDOUT
et alii with an explicit cast to chtype.  Some C preprocessors (gcc
4.8) fail to parse the cast (chtype is unknown and considered as 0).

For example:

cpp > /dev/null <<EOF
#include <curses.h>
#if A_STANDOUT
#endif
EOF
In file included from bug.c:1:0:
bug.c:2:5: error: missing binary operator before token "("
 #if A_STANDOUT
     ^

This may break existing code, like gen/gen.c in the Ada binding.

Would you decide to keep this cast, please consider applying the
attached patch to gen/gen.c.

Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]