Skip to content

Commit c879dfa

Browse files
committed
Restore GCC 10 test results, and add diagnostic for the one construct that's known not to work on GCC 10
Although I'd previously increased the minimum level of GCC support from 10.x to 11.x, in practice most things work just fine. The only known exception is a `forward` parameter of a non-wildcard type on a type-scope (aka member) function. So this commit: - restores the `test-results/gcc-10` directory (while still keeping the `gcc-13` one too) - adds a check for the known case that doesn't work in GCC 10 I don't intend to do a lot of work to support downlevel compilers, but if it's just one rarely-used item then it's worth trying to maintain downlevel compatibility. If we encounter other weaknesses with GCC 10, I'll likely just re-raise the minimum GCC version back to 11.
1 parent 7a1a992 commit c879dfa

File tree

187 files changed

+595
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

187 files changed

+595
-3
lines changed

include/cpp2util.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1755,8 +1755,10 @@ using cpp2::cpp2_new;
17551755
// See commit 5a0d77f8e297902c0b9712c5aafb6208cfa4c139.
17561756
#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ == 10
17571757
#define CPP2_REQUIRES(...) /* empty */
1758+
#define CPP2_REQUIRES_MEMFN(...) static_assert(false, "GCC 11 or higher is required to support type-scope functions that have a 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)' - if you must use GCC 10, use 'forward s: _' instead")
17581759
#else
17591760
#define CPP2_REQUIRES(...) requires (__VA_ARGS__)
1761+
#define CPP2_REQUIRES_MEMFN(...) requires (__VA_ARGS__)
17601762
#endif
17611763

17621764
#endif
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
g++-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
2+
Copyright (C) 2020 Free Software Foundation, Inc.
3+
This is free software; see the source for copying conditions. There is NO
4+
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Hello world

regression-tests/test-results/gcc-10/mixed-allcpp1-hello.cpp.output

Whitespace-only changes.
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
v as X< 0> = 0
2+
v as X< 1> = 1
3+
v as X< 2> = 2
4+
v as X< 3> = 3
5+
v as X< 4> = 4
6+
v as X< 5> = 5
7+
v as X< 6> = 6
8+
v as X< 7> = 7
9+
v as X< 8> = 8
10+
v as X< 9> = 9
11+
v as X<10> = 10
12+
v as X<11> = 11
13+
v as X<12> = 12
14+
v as X<13> = 13
15+
v as X<14> = 14
16+
v as X<15> = 15
17+
v as X<16> = 16
18+
v as X<17> = 17
19+
v as X<18> = 18
20+
v as X<19> = 19
21+
as_const(v) as X< 0> = 0
22+
as_const(v) as X< 1> = 1
23+
as_const(v) as X< 2> = 2
24+
as_const(v) as X< 3> = 3
25+
as_const(v) as X< 4> = 4
26+
as_const(v) as X< 5> = 5
27+
as_const(v) as X< 6> = 6
28+
as_const(v) as X< 7> = 7
29+
as_const(v) as X< 8> = 8
30+
as_const(v) as X< 9> = 9
31+
as_const(v) as X<10> = 10
32+
as_const(v) as X<11> = 11
33+
as_const(v) as X<12> = 12
34+
as_const(v) as X<13> = 13
35+
as_const(v) as X<14> = 14
36+
as_const(v) as X<15> = 15
37+
as_const(v) as X<16> = 16
38+
as_const(v) as X<17> = 17
39+
as_const(v) as X<18> = 18
40+
as_const(v) as X<19> = 19
41+
move(v) as X< 0> = 0
42+
move(v) as X< 1> = 1
43+
move(v) as X< 2> = 2
44+
move(v) as X< 3> = 3
45+
move(v) as X< 4> = 4
46+
move(v) as X< 5> = 5
47+
move(v) as X< 6> = 6
48+
move(v) as X< 7> = 7
49+
move(v) as X< 8> = 8
50+
move(v) as X< 9> = 9
51+
move(v) as X<10> = 10
52+
move(v) as X<11> = 11
53+
move(v) as X<12> = 12
54+
move(v) as X<13> = 13
55+
move(v) as X<14> = 14
56+
move(v) as X<15> = 15
57+
move(v) as X<16> = 16
58+
move(v) as X<17> = 17
59+
move(v) as X<18> = 18
60+
move(v) as X<19> = 19

regression-tests/test-results/gcc-10/mixed-as-for-variant-20-types.cpp.output

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Bounds safety violation: out of bounds access attempt detected

regression-tests/test-results/gcc-10/mixed-bounds-check.cpp.output

Whitespace-only changes.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
1
2+
44
3+
45
4+
46
5+
5

regression-tests/test-results/gcc-10/mixed-bounds-safety-with-assert-2.cpp.output

Whitespace-only changes.

0 commit comments

Comments
 (0)