multi_array warning with vs2005
Hello, I get these warnings : c:\program files\boost\boost_1_39_0\boost\multi_array.hpp(477) : warning C4996: 'std::uninitialized_fill_n': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators' c:\program files\boost\boost_1_38_0\boost\multi_array\extent_gen.hpp(49) : warning C4996: 'std::copy': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators' 1>c:\program files\boost\boost_1_38_0\boost\multi_array\multi_array_ref.hpp(374) : warning C4996: 'std::transform': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators' 1>c:\program files\boost\boost_1_38_0\boost\multi_array\multi_array_ref.hpp(380) : warning C4996: 'std::transform': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators' Ditto for boost_1_38_0 Am I supposed to disable the warning explicitly in my user code? Or should the warning disable be pushed/pop in boost multi_array? Rds,
AMDG Hicham Mouline wrote:
c:\program files\boost\boost_1_39_0\boost\multi_array.hpp(477) : warning C4996: 'std::uninitialized_fill_n': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
<snip>
Am I supposed to disable the warning explicitly in my user code? Or should the warning disable be pushed/pop in boost multi_array?
These warnings cannot always be suppressed with #pragma warning push/pop Just disable them In Christ, Steven Watanabe
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users- bounces@lists.boost.org] On Behalf Of Steven Watanabe Sent: 07 May 2009 15:38 To: boost-users@lists.boost.org Subject: Re: [Boost-users] multi_array warning with vs2005
AMDG
c:\program files\boost\boost_1_39_0\boost\multi_array.hpp(477) : warning C4996: 'std::uninitialized_fill_n': Function call with parameters
Hicham Mouline wrote: that may
be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
<snip>
Am I supposed to disable the warning explicitly in my user code? Or should the warning disable be pushed/pop in boost multi_array?
These warnings cannot always be suppressed with #pragma warning push/pop Just disable them
In Christ, Steven Watanabe
Just to clarify, I understand then that this multi_array code is standard compliant, and that the warning is specific to msvc and that multi_array developers couldn't not suppress the warning with pragmas for some reason... I shouldn't open a ticket then...
On Thursday 07 May 2009, Hicham Mouline wrote:
are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS.
These warnings cannot always be suppressed with #pragma warning push/pop Just disable them
In Christ, Steven Watanabe
Just to clarify, I understand then that this multi_array code is standard compliant, and that the warning is specific to msvc and that multi_array developers couldn't not suppress the warning with pragmas for some reason... I shouldn't open a ticket then...
Right. For further information, search the mailing list archives (boost-users, boost) for _SCL_SECURE_* Yours, Jürgen -- * Dipl.-Math. Jürgen Hunold ! Ingenieurgesellschaft für * voice: ++49 511 262926 57 ! Verkehrs- und Eisenbahnwesen mbH * fax : ++49 511 262926 99 ! Lister Straße 15 * juergen.hunold@ivembh.de ! www.ivembh.de * * Geschäftsführer: ! Sitz des Unternehmens: Hannover * Prof. Dr.-Ing. Thomas Siefer ! Amtsgericht Hannover, HRB 56965 * PD Dr.-Ing. Alfons Radtke !
Quoting Hicham Mouline
Just to clarify, I understand then that this multi_array code is standard compliant, and that the warning is specific to msvc and that multi_array developers couldn't not suppress the warning with pragmas for some reason... I shouldn't open a ticket then...
If you wanted to open a ticket, it would be to request the use of unchecked_uninitialized_fill_n on MSVC>=8. This avoids the warning. The phrase "non-standard Microsoft extension" is like a red rag to a bull to many developers though, so it may not be acted upon. Personally I'd love to not have to make the trade-off between using Boost libraries and being able to leave certain occasionally useful warnings on, but it is not possible certainly now and perhaps never.
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users- bounces@lists.boost.org] On Behalf Of Peter Bartlett Sent: 07 May 2009 16:41 To: boost-users@lists.boost.org Subject: Re: [Boost-users] multi_array warning with vs2005
Quoting Hicham Mouline
: Just to clarify, I understand then that this multi_array code is standard compliant, and that the warning is specific to msvc and that multi_array developers couldn't not suppress the warning with pragmas for some reason... I shouldn't open a ticket then...
If you wanted to open a ticket, it would be to request the use of unchecked_uninitialized_fill_n on MSVC>=8. This avoids the warning. The phrase "non-standard Microsoft extension" is like a red rag to a bull to many developers though, so it may not be acted upon.
Or it could be to include turning off the warning in multi_array headers with this pop/push thingie... But it's being said that is impossible for that particular warning, I feel I'm not totally getting the point, Rds,
participants (4)
-
Hicham Mouline
-
Juergen Hunold
-
Peter Bartlett
-
Steven Watanabe