几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】extensionsexservicesexstringio.cpp on uni (http://www.dimcax.com/hust/showthread.php?t=16259)

yang686526 2009-05-05 10:37 AM

【转帖】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


所有的时间均为北京时间。 现在的时间是 08:21 PM.