Opened 14 years ago
Closed 11 years ago
#2390 closed Patches (fixed)
[patch] fix gcc-4.3 "unused" warning in floating_point_comparison
Reported by: | Owned by: | Gennadiy Rozental | |
---|---|---|---|
Milestone: | To Be Determined | Component: | test |
Version: | Boost Development Trunk | Severity: | Problem |
Keywords: | test floating point gcc 4.3 warnings | Cc: |
Description
Using -Wall -Werror under gcc-4.3, compilation of floating_point_comparison can fail with a "defined but not used" warning.
The attached patch against r49167 fixes this warning.
Attachments (3)
Change History (7)
by , 14 years ago
Attachment: | float_comparison_unused.patch added |
---|
by , 14 years ago
Attachment: | floating_point_comparison.hpp.diff added |
---|
Improved patch for all gcc-4.3 warnings
comment:1 by , 14 years ago
Keywords: | test floating point gcc 4.3 warnings added |
---|
I constructed an improved patch based on the ideas of Steven Watanabe for check_is_close and check_is_small.
The mailing list thread starts with: http://lists.boost.org/Archives/boost/2008/10/143756.php I've tested the patch with gcc-4.3.2 on SuSE-Linux 11 and msvc-9.0.
comment:2 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
by , 14 years ago
Attachment: | floating_point_comparison.hpp.2.diff added |
---|
Patch to add missing const qualifiers
comment:3 by , 14 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Gennadiy, thanks for fixing this. Unfortunately, my patch was incomplete. I've compiled some other projects in the meantime and found that operator() in check_is_close and check_is_small needs to be "const" to get them working. This is due to the fact that Boost.Test now stores a "const&" to those two object. I've attached a small patch fixing this new issue. Tested on gcc-4.2/4.3 and msvc-9.0 SP1.
comment:4 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
I believe this is already fixed in trunk
patch against r49167