Skip to content

Commit de2cd5c

Browse files
authored
Merge pull request #6736 from sloriot/STL_extensions-Uncertain_warnings
Workaround warning with gcc master
2 parents 7f49616 + 6acb3a1 commit de2cd5c

File tree

7 files changed

+14
-8
lines changed

7 files changed

+14
-8
lines changed

Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ArrangementPainterOstream.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ ArrangementPainterOstream<CGAL::Arr_linear_traits_2<Kernel_>>::operator<<(
289289
QRectF seg_bb = this->convert(seg.bbox());
290290
if (
291291
this->clippingRect.isValid() &&
292-
!this->clippingRect.intersects(seg_bb) &
292+
!this->clippingRect.intersects(seg_bb) &&
293293
(!seg.is_horizontal() && !seg.is_vertical()))
294294
{ return *this; }
295295

Kernel_23/include/CGAL/Kernel_23/internal/Projection_traits_3.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,7 @@ class Projection_traits_3 {
960960

961961
Equal_x_2 eqx;
962962
Equal_y_2 eqy;
963-
return eqx(p,q) & eqy(p,q);
963+
return eqx(p,q) && eqy(p,q);
964964
}
965965
};
966966

Mesh_3/include/CGAL/Mesh_3/search_for_connected_components_in_labeled_image.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ search_for_connected_components_in_labeled_image(const CGAL::Image_3& image,
7373
for(uint i=0; i<nx; i++)
7474
{
7575
using CGAL::IMAGEIO::static_evaluate;
76-
77-
if(visited[voxel_index] | second_pass[voxel_index]) {
76+
if(visited[voxel_index] || second_pass[voxel_index]) {
7877
++voxel_index;
7978
continue;
8079
}

Number_types/include/CGAL/GMP/Gmpzf_type.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ class Gmpzf :
157157
return;
158158
}
159159
const int p = std::numeric_limits<double>::digits;
160-
CGAL_assertion(CGAL_NTS is_finite(d) & is_valid(d));
160+
CGAL_assertion(CGAL_NTS is_finite(d) && is_valid(d));
161161
int exp;
162162
double x = std::frexp(d, &exp); // x in [1/2, 1], x*2^exp = d
163163
mpz_init_set_d (man(), // to the following integer:

Number_types/include/CGAL/MP_Float.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ namespace INTERN_MP_FLOAT {
762762
while (true) {
763763
x = x % y;
764764
if (x == 0) {
765-
CGAL_postcondition(internal::divides(y, a) & internal::divides(y, b));
765+
CGAL_postcondition(internal::divides(y, a) && internal::divides(y, b));
766766
y.gcd_normalize();
767767
return y;
768768
}

STL_Extension/include/CGAL/Uncertain.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,11 @@ Uncertain<bool> operator!(Uncertain<bool> a)
289289
return Uncertain<bool>(!a.sup(), !a.inf());
290290
}
291291

292+
#ifdef __clang__
293+
# pragma GCC diagnostic push
294+
# pragma GCC diagnostic ignored "-Wunknown-warning-option"
295+
# pragma GCC diagnostic ignored "-Wbitwise-instead-of-logical"
296+
#endif
292297
inline
293298
Uncertain<bool> operator|(Uncertain<bool> a, Uncertain<bool> b)
294299
{
@@ -324,7 +329,9 @@ Uncertain<bool> operator&(Uncertain<bool> a, bool b)
324329
{
325330
return Uncertain<bool>(a.inf() & b, a.sup() & b);
326331
}
327-
332+
#ifdef __clang__
333+
# pragma GCC diagnostic pop
334+
#endif
328335

329336
// Equality operators
330337

Straight_skeleton_2/include/CGAL/constructions/Straight_skeleton_cons_ftC2.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ bool are_parallel_edges_equally_oriented( Segment_2_with_ID<K> const& e0, Segmen
4545
template<class K>
4646
bool are_edges_orderly_collinear( Segment_2_with_ID<K> const& e0, Segment_2_with_ID<K> const& e1 )
4747
{
48-
return are_edges_collinear(e0,e1) & are_parallel_edges_equally_oriented(e0,e1);
48+
return are_edges_collinear(e0,e1) && are_parallel_edges_equally_oriented(e0,e1);
4949
}
5050

5151

0 commit comments

Comments
 (0)