Compile-time assert on 32-bit Solaris & HPUX due to IEEE754 issue
-----------------------------------------------------------------

         Key: XALANC-569
         URL: http://issues.apache.org/jira/browse/XALANC-569
     Project: XalanC
        Type: Bug
  Components: XalanC  
    Versions: 1.10    
 Environment: 32-bit Solaris & HPUX
    Reporter: Ashley Zinyk
     Fix For: 1.10


The following error occurs while compiling DoubleSupport.cpp on Solaris:

CC -g     -KPIC -mt -xs -ptr../../obj -features=rtti -DSOLARIS -D_REENTRANT 
-DXALAN_INMEM_MSG_LOADER -c 
-I/export/home/torxslt/BuildClient/xalanc_root/LatestC-CVS-solaris_28-cc_62/c/src
 
-I/export/home/torxslt/BuildClient/xalanc_root/LatestC-CVS-solaris_28-cc_62/c/include
 -I../../nls/include 
-I/export/home/torxslt/BuildClient/xalanc_root/xerces-c_2_7_0-solaris_28-cc_62/src/
 
-I/export/home/torxslt/BuildClient/xalanc_root/xerces-c_2_7_0-solaris_28-cc_62/include/xercesc
 
-I/export/home/torxslt/BuildClient/xalanc_root/xerces-c_2_7_0-solaris_28-cc_62/include/
  -o ../../obj/DoubleSupport.o 
/export/home/torxslt/BuildClient/xalanc_root/LatestC-CVS-solaris_28-cc_62/c/src/xalanc/PlatformSupport/DoubleSupport.cpp
"/export/home/torxslt/BuildClient/xalanc_root/LatestC-CVS-solaris_28-cc_62/c/src/xalanc/Include/PlatformDefinitions.hpp",
 line 126: Error: An array must have at least one element.
"/export/home/torxslt/BuildClient/xalanc_root/LatestC-CVS-solaris_28-cc_62/c/src/xalanc/PlatformSupport/DoubleSupport.cpp",
 line 76:     Where: While specializing 
"xalanc_1_10::XalanCompileErrorBoolean<0>".
"/export/home/torxslt/BuildClient/xalanc_root/LatestC-CVS-solaris_28-cc_62/c/src/xalanc/PlatformSupport/DoubleSupport.cpp",
 line 76:     Where: Specialized in non-template code.

The error is similar on HPUX:

aCC -g   +DAportable   +Z -DHPUX -D_THREAD_SAFE +W849,930 -mt  
-Wc,-koenig_lookup,on -Wc,-ansi_for_scope,on -DXALAN_INMEM_MSG_LOADER -c 
-I/home/torxslt/BuildClient/xalanc_root/LatestC-CVS-hpux_11i-acc_a03/c/src 
-I/home/torxslt/BuildClient/xalanc_root/LatestC-CVS-hpux_11i-acc_a03/c/include 
-I../../nls/include 
-I/home/torxslt/BuildClient/xalanc_root/xerces-c_2_7_0-hpux_11i-acc_a03/src/ 
-I/home/torxslt/BuildClient/xalanc_root/xerces-c_2_7_0-hpux_11i-acc_a03/include/xercesc
 
-I/home/torxslt/BuildClient/xalanc_root/xerces-c_2_7_0-hpux_11i-acc_a03/include/
  -o ../../obj/DoubleSupport.o 
/home/torxslt/BuildClient/xalanc_root/LatestC-CVS-hpux_11i-acc_a03/c/src/xalanc/PlatformSupport/DoubleSupport.cpp
Error 419: 
"/home/torxslt/BuildClient/xalanc_root/LatestC-CVS-hpux_11i-acc_a03/c/src/xalanc/PlatformSupport/DoubleSupport.cpp",
 line 74 # 'is_iec559' is used as a type, but has not been defined as a type.
            XALAN_STATIC_ASSERT(numeric_limits<double>::is_iec559);
            ^^^^^^^^^^^^^^^^^^^                                    
Error 502: 
"/home/torxslt/BuildClient/xalanc_root/LatestC-CVS-hpux_11i-acc_a03/c/src/xalanc/PlatformSupport/DoubleSupport.cpp",
 line 74 # Attempt to access 'numeric_limits<double>::<type inserted by 
compiler>' is invalid; '<type inserted by compiler>' is not a member of 
'numeric_limits<double>' or any base class.
            XALAN_STATIC_ASSERT(numeric_limits<double>::is_iec559);
            ^^^^^^^^^^^^^^^^^^^                                    
Error 322: 
"/home/torxslt/BuildClient/xalanc_root/LatestC-CVS-hpux_11i-acc_a03/c/src/xalanc/PlatformSupport/DoubleSupport.cpp",
 line 74 # An expression was expected instead of type 'bool (int)' in the 
specialization of template 'XalanCompileErrorBoolean'.
            XALAN_STATIC_ASSERT(numeric_limits<double>::is_iec559);
            ^^^^^^^^^^^^^^^^^^^                                    
Error 187: 
"/home/torxslt/BuildClient/xalanc_root/LatestC-CVS-hpux_11i-acc_a03/c/src/xalanc/PlatformSupport/DoubleSupport.cpp",
 line 74 # Referenced object '@$XalanCompileErrorBoolean' is not a member of 
class XalanCompileErrorBoolean<bool (int)> 
["/home/torxslt/BuildClient/xalanc_root/LatestC-CVS-hpux_11i-acc_a03/c/src/xalanc/PlatformSupport/DoubleSupport.cpp",
 line 74].
            XALAN_STATIC_ASSERT(numeric_limits<double>::is_iec559);
            ^^^^^^^^^^^^^^^^^^^                                    

The problem was introduced in XALANC-511, which introduces a compile-time check 
to verify that the platform has IEEE754 (standard floating point) support.  


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to