[CLN-list] CLN patch 3 for MSVC

Richard B. Kreckel kreckel at ginac.de
Sun Mar 13 23:33:29 CET 2011


Hi Jan!

On 03/13/2011 08:39 AM, Jan wrote:
> here is a simple one correcting some unclear code (at least from the
> point of view of the pedantic MSVC compiler).
>
> 1. Added const because the original declaration in the header file also
> has it

This is obviously correct and should be applied right away. I'll do so 
shortly. Thanks.

> 2. Added double to resolve ambiguities in which log() function is meant

Same here.

> With this patch and the two others I sent earlier CLN compiles with MSVC
> and all tests pass successfully.

Great! What version of MSVC are you using?

With regard to your other patches, these look like obscure workarounds. 
Pardon me, but fixing bugs in CLN without reporting the problem to the 
compiler manufacturer is just wrong IMHO. Have you tried submitting a 
bug report?

If I am not mistaken, there are three issues:

1) Why does declaring a symbol extern "C" within a namespace result in 
another symbol than when it's declared outside the namespace?

2) Why have to qualify cl_I_constructor_from_UL() with cln:: in code 
clearly inside the namespace cln?

3) Why can't we declare an extern function within an inline function 
where it's needed?

Assuming the answer to all three questions is "it's a bug in MSVC", 
please help improve the state of software at the right place:

*) Write bug reports! <http://connect.microsoft.com/VisualStudio> should 
be the right place, I suppose. Hopefully, MS will fix them some day.

*) Work around the bugs in CLN using #if _MSC_VER preprocessor symbols 
in order to document it as a workaround. I'll accept such a patch if you 
send me one.

Best wishes
    -richy.
-- 
Richard B. Kreckel
<http://www.ginac.de/~kreckel/>


More information about the CLN-list mailing list