查看单个帖子
旧 2009-05-05, 10:37 AM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】extensionsexservicesexstringio.cpp on uni

extensions/exservices/exstringio.cpp on unix
extensions/exservices/exstringio.cpp on unix
trying to compile extensions/exservices/exstringio.cpp on unix fails.
you get some sort of error like:
exedinputparser.h:67: error: a casts to a type other than an integral or enumeration type cannot appear in a constant-expression
(and other similar ones).
the header looks like this:
code:
bool addchar(odchar ch)
{
switch(ch)
{
case dd_t('('):
if(!m_bquote)
++m_nparenthesis;
break;and the line it complains about is the case statement.
the preprocessor actually produces this:
code:
case ((const odchar*)l')'):for the case statement. changing this to:
code:
case (l'('):makes gcc happy.
am i doing something wrong?
quote:
originally posted by tim hughes
trying to compile extensions/exservices/exstringio.cpp on unix fails.
you get some sort of error like:
exedinputparser.h:67: error: a casts to a type other than an integral or enumeration type cannot appear in a constant-expression
(and other similar ones).
the header looks like this:
code:
bool addchar(odchar ch)
{
switch(ch)
{
case dd_t('('):
if(!m_bquote)
++m_nparenthesis;
break;and the line it complains about is the case statement.
the preprocessor actually produces this:
code:
case ((const odchar*)l')'):for the case statement. changing this to:
code:
case (l'('):makes gcc happy.
am i doing something wrong?
you are right, it is our bug. dd_t macro is not intended for use with chars
vladimir
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)