Skip to content

Commit

Permalink
Merge pull request #6263 from yosefe/topic/config-test-fix-compilatio…
Browse files Browse the repository at this point in the history
…n-on-gcc11-v1.10.x

CONFIG/TEST: Fix compilation on gcc11 - v1.10.x
  • Loading branch information
yosefe authored Feb 3, 2021
2 parents f28a15c + 12b0ba4 commit 4b765ec
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
20 changes: 10 additions & 10 deletions config/m4/compiler.m4
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ AC_DEFUN([DETECT_UARCH],
# CHECK_COMPILER_FLAG
# Usage: CHECK_COMPILER_FLAG([name], [flag], [program], [if-true], [if-false])
#
# The macro checks if program may be compiled using specified flag
# The macro checks if program may be compiled and linked using specified flag
#
AC_DEFUN([CHECK_COMPILER_FLAG],
[
Expand All @@ -214,15 +214,15 @@ AC_DEFUN([CHECK_COMPILER_FLAG],
SAVE_CXXFLAGS="$CFLAGS"
CFLAGS="$BASE_CFLAGS $CFLAGS $2"
CXXFLAGS="$BASE_CXXFLAGS $CXXFLAGS $2"
AC_COMPILE_IFELSE([$3],
[AC_MSG_RESULT([yes])
CFLAGS="$SAVE_CFLAGS"
CXXFLAGS="$SAVE_CXXFLAGS"
$4],
[AC_MSG_RESULT([no])
CFLAGS="$SAVE_CFLAGS"
CXXFLAGS="$SAVE_CXXFLAGS"
$5])
AC_LINK_IFELSE([$3],
[AC_MSG_RESULT([yes])
CFLAGS="$SAVE_CFLAGS"
CXXFLAGS="$SAVE_CXXFLAGS"
$4],
[AC_MSG_RESULT([no])
CFLAGS="$SAVE_CFLAGS"
CXXFLAGS="$SAVE_CXXFLAGS"
$5])
])


Expand Down
4 changes: 3 additions & 1 deletion test/gtest/ucs/test_pgtable.cc
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,9 @@ class test_pgtable_perf : public test_pgtable {

private:
struct region_comparator {
bool operator()(ucs_pgt_region_t* region1, ucs_pgt_region_t* region2) {
bool
operator()(ucs_pgt_region_t *region1, ucs_pgt_region_t *region2) const
{
return region1->end <= region2->start;
}
};
Expand Down

0 comments on commit 4b765ec

Please sign in to comment.