[Botan-devel] Compiler warnings in VS2005

Joel Low joel at joelsplace.sg
Sun Sep 23 17:37:35 EDT 2007


I believe that Jack won't be interested in fixing these, because he uses
exception specifiers to a) enforce the types of exceptions which can be
thrown and b) hint to the programmer the types of exceptions he should look
out for.

Only VC gives such warnings because they don't really care about the
exception specifiers. You can disable them by passing /Wd4290 (I do that for
all my projects).

I'm not sure what 4250 means though, probably something to do with
namespaces.

Generally for most development libraries I use the developers only fix
warnings if it affects the generated object code, otherwise their preferred
method is to use suppression switches. One thing I do know however is that
Jack develops and tests Botan on linux/gcc so he does get a different set of
warnings. The only time I do need to inform him is during a build failure,
otherwise he is quite aware of things.

HTH,
Joel

> -----Original Message-----
> From: botan-devel-bounces at randombit.net [mailto:botan-devel-
> bounces at randombit.net] On Behalf Of Boris
> Sent: Monday, 24 September, 2007 2:07 AM
> To: botan-devel at randombit.net
> Subject: [Botan-devel] Compiler warnings in VS2005
> 
> Hi Jack,
> 
> I'm a new Botan user (found it through monotone) and want to thank you
> first
> for this nice library! Currently I'm playing a bit with public key
> functions
> in Visual Studio 2005. While everything works fine so far I see quite a
> lot
> of warnings in VS2005:
> 
> C:\Botan\botan/base.h(29) : warning C4290: C++ exception specification
> ignored except to indicate a function is not __declspec(nothrow)
> C:\Botan\botan/base.h(30) : warning C4290: C++ exception specification
> ignored except to indicate a function is not __declspec(nothrow)
> C:\Botan\botan/base.h(158) : warning C4290: C++ exception specification
> ignored except to indicate a function is not __declspec(nothrow)
> C:\Botan\botan/if_algo.h(54) : warning C4250:
> 'Botan::IF_Scheme_PrivateKey'
> : inherits
> 'Botan::IF_Scheme_PublicKey::Botan::IF_Scheme_PublicKey::max_input_bits
> ' via
> dominance
>         C:\Botan\botan/if_algo.h(26) : see declaration of
> 'Botan::IF_Scheme_PublicKey::max_input_bits'
> ...
> C:\Botan\botan/rsa.h(30) : warning C4250: 'Botan::RSA_PublicKey' :
> inherits
> 'Botan::IF_Scheme_PublicKey::Botan::IF_Scheme_PublicKey::check_key' via
> dominance
>         C:\Botan\botan/if_algo.h(21) : see declaration of
> 'Botan::IF_Scheme_PublicKey::check_key'
> ...
> C:\Botan\botan/rsa.h(52) : warning C4250: 'Botan::RSA_PrivateKey' :
> inherits
> 'Botan::RSA_PublicKey::Botan::RSA_PublicKey::algo_name' via dominance
>         C:\Botan\botan/rsa.h(21) : see declaration of
> 'Botan::RSA_PublicKey::algo_name'
> ...
> 
> Not that they cause a problem. But is there any interest to get rid of
> the
> warnings? Of course the warnings depend on the compiler used. But given
> that
> VS2005 is quite a popular platform Botan might also benefit if it can
> be
> compiled without warnings out of the box? Or is the Botan
> recommendation to
> fix warnings yourself using compiler switches or pragmas?
> 
> Boris
> 
> _______________________________________________
> botan-devel mailing list
> botan-devel at randombit.net
> http://www.randombit.net/mailman/listinfo/botan-devel





More information about the botan-devel mailing list