Thanks Peter,
That is just another case of weird behaviour of the Sun Compiler. I did
this:
[... quickfix]$ diff -u src/C++/test/SessionTestCase.h{,~}
--- src/C++/test/SessionTestCase.h Wed May 20 10:26:13 2009
+++ src/C++/test/SessionTestCase.h~ Thu Aug 17 21:00:36 2006
@@ -98,7 +98,7 @@
{
MsgType msgType;
message.getHeader().getField( msgType );
- switch ( + msgType.getValue() [ 0 ] )
+ switch ( msgType.getValue() [ 0 ] )
{
case 'A':
m_toLogon++; m_logon = message; break;
@@ -121,7 +121,7 @@
{
MsgType msgType;
message.getHeader().getField( msgType );
- switch ( + msgType.getValue() [ 0 ] )
+ switch ( msgType.getValue() [ 0 ] )
{
case '0':
m_fromHeartbeat++; break;
@@ -155,7 +155,7 @@
MsgType msgType;
message.getHeader().getField( msgType );
- switch ( + msgType.getValue() [ 0 ] )
+ switch ( msgType.getValue() [ 0 ] )
{
case 'j':
m_toBusinessMessageReject++; break;
One note: sole purpose of unary + is to do the integral promotion.
Max
2009/4/24 Peter Leipold <pet...@eq...>
> QuickFIX Documentation:
> http://www.quickfixengine.org/quickfix/doc/html/index.html
> QuickFIX Support: http://www.quickfixengine.org/services.html
>
>
> Hi Max,
>
> > On the other hand, when I build it using Sun Studio compiler (Sun C++ 5.9
> > SunOS_i386 Patch 124864-09 2008/12/16) the unit test produces the
> following
> > output:
>
> I ran into the same trouble. There are a couple of lines in that file like
> this:
> switch ( msgType.getValue() [ 0 ] )
>
> Somehow - weird enough - the compiler cannot branch properly here, as the
> data
> type is char, instead of int. If you replace these lines with:
> switch ( int(msgType.getValue() [ 0 ]) )
>
> then all unit tests will pass.
>
> > In other words, I have to filter out gcc specific flags from all the
> > makefiles to make a successful build with the Sun Studio compiler.
>
> Just for info, as I ran into the same problem last week and solved a bit
> differently: One can also remove these flags from SHAREDFLAGS variable by
> editing the configure script.
>
> Peter
>
>
>
> ------------------------------------------------------------------------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensign option that enables unlimited
> royalty-free distribution of the report engine for externally facing
> server and web deployment.
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> Quickfix-developers mailing list
> Qui...@li...
> https://lists.sourceforge.net/lists/listinfo/quickfix-developers
>
|