Operating System - HP-UX
1745783 Members
3626 Online
108722 Solutions
New Discussion юеВ

Re: error #20: identifier "float_round_style" is undefined

 
Neel2
Regular Advisor

error #20: identifier "float_round_style" is undefined

Hi,

While trying to build on HP-UX B.11.23 U ia64, using thirdparty front end to compile, I am getting the following error:


"/usr/include/math.h", line 1147: error #77-D: this declaration has no storage
class or type specifier
__inline float fabsf(float __x) { return _Asm_fabs(__x); }
^

"/usr/include/math.h", line 1147: error #65: expected a ";"
__inline float fabsf(float __x) { return _Asm_fabs(__x); }
"/opt/aCC.06.15/opt/aCC/include/cmath", line 24: error #20: identifier
"_Asm_fabs" is undefined
inline double fabs(double x) { return _Asm_fabs(x); }
^

"/opt/aCC.06.15/opt/aCC/include/cmath", line 26: error #20: identifier
"_Asm_fabs" is undefined
inline double abs (double x) { return _Asm_fabs(x); }
^

"/opt/aCC.06.15/opt/aCC/include/limits", line 153: error #20: identifier
"float_round_style" is undefined
static const float_round_style round_style;
^

"/opt/aCC.06.15/opt/aCC/include/limits", line 225: error #20: identifier
"float_round_style" is undefined
const float_round_style numeric_limits::round_style = round_toward_zero;
^

"/opt/aCC.06.15/opt/aCC/include/limits", line 332: error #20: identifier
"float_round_style" is undefined
static const float_round_style RWSTDExportTemplate round_style __RW_INIT(RWS
TD_STATIC_CAST(float_round_style,FLT_ROUNDS));
^
detected during instantiation of class "numeric_limits" at
line 285

"/opt/aCC.06.15/opt/aCC/include/limits", line 332: error #321: data member
initializer is not allowed
static const float_round_style RWSTDExportTemplate round_style __RW_INIT(RWS
TD_STATIC_CAST(float_round_style,FLT_ROUNDS));
^
detected during instantiation of class "numeric_limits" at
line 285


In addition, I have provided the following includes while builing the front end compiler using aCC 6.15.

#if defined(__ia64)
v_argv[n++] ="-I/opt/aCC.06.15/opt/aCC/include";
v_argv[n++] ="-I/opt/aCC.06.15/opt/aCC/include/iostream";
v_argv[n++] ="-I/opt/aCC.06.15/opt/aCC/include_std";
v_argv[n++] ="-I/usr";
#endif



Any suggestion would be appreciated.

Regards,
Neel



2 REPLIES 2
Dennis Handly
Acclaimed Contributor

Re: error #20: identifier "float_round_style" is undefined

>using thirdparty front end to compile

Unless your third party preprocessor matches exactly with what aCC6 is doing, you'll continue to have problems like this and your previous threads:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1223245

>error #77-D: this declaration has no storage class or type specifier
__inline float fabsf(float __x)

Just pass in -D__inline=inline.

>error #20: identifier "_Asm_fabs" is undefined

All _Asm_* functions are builtin.

>/opt/aCC.06.15/opt/aCC/include/limits: error #20: identifier "float_round_style" is undefined
static const float_round_style round_style;

I'm not sure what's wrong here? You should be using the includes from include_std. float_round_style should be defined before use.

#if defined(__ia64)
"-I/opt/aCC.06.15/opt/aCC/include";
"-I/opt/aCC.06.15/opt/aCC/include/iostream";
"-I/opt/aCC.06.15/opt/aCC/include_std";
"-I/usr";

These are incorrect. There shouldn't be any #if. There needs to be a set for -AP and another set of -AA. The above set is a miss mash of the two.

Use -v to see the paths for -AA (the default) and -AP.
Neel2
Regular Advisor

Re: error #20: identifier "float_round_style" is undefined

Thanks for reply.

I will try to defined the above declaration for thirdparty.

Neel