This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Makefile b/Makefile | |
index ee02e0f..25a4aa5 100644 | |
--- a/Makefile | |
+++ b/Makefile | |
@@ -373,19 +373,19 @@ maketest: | |
stage1: force | |
-mkdir stage1 | |
mv $(STAGESTUFF) $(STAGE_GCC) stage1 | |
- -rm stage1/gnulib | |
+ -rm -f stage1/gnulib |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -ex | |
BUILD_GCC_DIR="${BUILD_DIR}/gcc" | |
OUTPUT_DIR="${WORKSPACE}/lcov_output" | |
TRACE_FILE="${WORKSPACE}/coverage.info" | |
SUMMARY_FILE="${WORKSPACE}/summary.txt" | |
# Dirty hack | |
cp "${SRC_DIR}/gcc/cp/cfns.gperf" "${BUILD_GCC_DIR}/" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void foo(const int*x, int*y) | |
{ | |
cout << *x << *y << '\n'; // 0 0 | |
*y = 2; | |
cout << *x << *y << '\n; // 2 2 | |
*const_cast<int*>(x) = 3 | |
cout << *x << *y << '\n' // 4 4 | |
} | |
struct S { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int64_t compute(int64_t sz, size_t iter_num) | |
{ | |
using namespace ranges::v3; | |
auto res = view::generate([sz]{ | |
auto xs = view::iota(0LL, sz); | |
auto ys = view::zip_with([](auto x, auto y){ return x+y; }, | |
xs, xs | view::drop(1)); | |
return accumulate(ys | view::stride(100), 0LL); | |
}); | |
return *(res | view::drop_exactly(iter_num-1)).begin(); |