[omniORB] Visual Studio 2008 level 4 compiler warnings
Richard Pitts
Richard.Pitts at cdl.co.uk
Fri May 4 12:11:26 BST 2012
Hi
> I'm afraid it can't be in the 4.1.7 release. The cdrStream layout is quite different in trunk (which will be the 4.2.x release) to what's in 4.1.x. The 4.2.x version can't be back-ported to 4.1.x because it's binary incompatible. 4.1.x uses the CdrMarshal and CdrUnmarshal macros rather more.
Thanks that would be great. Good to know a 4.2.x release is on the way, we'll be upgrading when it's available.
> Anyway, I think the compiler warning is incredibly unwise. A do .. while
> (0) loop is the standard way of defining a macro that's safe to use like a function. Surely the warning triggers on any robust macro code?
Unfortunately one of Visual Studio's 'silly warnings', but surprisingly only triggered in cdrStream.h in our source. In C++ an inline function maybe preferable in some circumstances and I think this warning is there to discourage function-like macros.
Kind Regards
Richard Pitts
Windows Developer
CDL
-----Original Message-----
From: Duncan Grisby [mailto:duncan at grisby.org]
Sent: 04 May 2012 10:44
To: Richard Pitts
Cc: omniorb-list at omniorb-support.com
Subject: RE: [omniORB] Visual Studio 2008 level 4 compiler warnings
On Fri, 2012-05-04 at 10:08 +0100, Richard Pitts wrote:
> I’ve created a patch for cdrStream.h on trunk to resolve the C4127
> warnings. The patch removes the CdrMarshal and CdrUnMarshal macros and
> place the definitions in macro intMarshalFns.
Thanks for the patch. It makes sense for trunk, and I'll put something along those lines in. Perhaps you can send it again as an attachment, because it has become a bit mangled in the email body?
> Any suggestions welcome and feel free to make any changes. I’m hoping
> this can be in the 4.1.7 release.
I'm afraid it can't be in the 4.1.7 release. The cdrStream layout is quite different in trunk (which will be the 4.2.x release) to what's in 4.1.x. The 4.2.x version can't be back-ported to 4.1.x because it's binary incompatible. 4.1.x uses the CdrMarshal and CdrUnmarshal macros rather more.
Anyway, I think the compiler warning is incredibly unwise. A do .. while
(0) loop is the standard way of defining a macro that's safe to use like a function. Surely the warning triggers on any robust macro code?
Cheers,
Duncan.
--
-- Duncan Grisby --
-- duncan at grisby.org --
-- http://www.grisby.org --
**********************************************************************
Please consider the environment - do you really need to print this email?
This email is intended only for the person(s) named above and may contain private and confidential information. If it has come to you in error, please destroy and permanently delete any copy in your possession and contact us on +44 (0) 161 480 4420. The information in this email is copyright © CDL Group Holdings Limited. We cannot accept any liability for any loss or damage sustained as a result of software viruses. It is your responsibility to carry out such virus checking as is necessary before opening any attachment.
Cheshire Datasystems Limited uses software which automatically screens incoming emails for inappropriate content and attachments. If the software identifies such content or attachment, the email will be forwarded to our Technology Department for checking. You should be aware that any email which you send to Cheshire Datasystems Limited is subject to this procedure.
Cheshire Datasystems Limited, Strata House, Kings Reach Road, Stockport SK4 2HD
Registered in England and Wales with Company Number 3991057
VAT registration: 727 1188 33
-------------- next part --------------
A non-text attachment was scrubbed...
Name: C4127-warning-patch.diff
Type: application/octet-stream
Size: 2791 bytes
Desc: C4127-warning-patch.diff
Url : http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20120504/a991f8be/C4127-warning-patch.obj
More information about the omniORB-list
mailing list