GCC with patches for OS216
修订版 | 6948c7c3d29bf5892299550a19ce615a85ef9b2b (tree) |
---|---|
时间 | 2020-06-26 00:02:45 |
作者 | Iain Buclaw <ibuclaw@gdcp...> |
Commiter | Iain Buclaw |
d: Turn on deprecation warnings by default.
This is the default in the upstream reference compiler, and can reduce
some confusion when comparing warning/error messages of gdc and dmd side
by side.
Merges libphobos with upstream druntime d05ebaad and phobos 021ae0df7.
Reviewed-on: https://github.com/dlang/druntime/pull/3127
https://github.com/dlang/phobos/pull/7521
gcc/d/ChangeLog:
* d-lang.cc (d_init_options): Turn on deprecation warnings by default.
libphobos/ChangeLog:
* libdruntime/MERGE: Merge upstream druntime d05ebaad.
* src/MERGE: Merge upstream phobos 021ae0df7.
* testsuite/libphobos.typeinfo/struct-align.d: Remove empty statement.
gcc/testsuite/ChangeLog:
* gdc.dg/asm1.d: Don't use deprecated asm syntax.
* gdc.dg/compilable.d: Add public to selective import.
* gdc.dg/lto/ltotests_0.d: Explicitly catch Throwable.
* gdc.dg/runnable.d: Remove empty statement.
@@ -306,7 +306,7 @@ d_init_options (unsigned int, cl_decoded_option *decoded_options) | ||
306 | 306 | global.params.cplusplus = CppStdRevisionCpp14; |
307 | 307 | |
308 | 308 | /* Warnings and deprecations are disabled by default. */ |
309 | - global.params.useDeprecated = DIAGNOSTICoff; | |
309 | + global.params.useDeprecated = DIAGNOSTICinform; | |
310 | 310 | global.params.warnings = DIAGNOSTICoff; |
311 | 311 | |
312 | 312 | global.params.imppath = new Strings (); |
@@ -13,8 +13,8 @@ void parse2() | ||
13 | 13 | { |
14 | 14 | asm |
15 | 15 | { |
16 | - "" : : "g" 1 ? 2 : 3; | |
17 | - "" : : "g" 1 ? 2 : : 3; | |
16 | + "" : : "g" (1 ? 2 : 3); | |
17 | + "" : : "g" (1 ? 2 : :) 3; | |
18 | 18 | // { dg-error "expression expected, not ':'" "" { target *-*-* } .-1 } |
19 | 19 | // { dg-error "expected constant string constraint for operand" "" { target *-*-* } .-2 } |
20 | 20 | } |
@@ -58,7 +58,7 @@ void semantic1() | ||
58 | 58 | void semantic2a(X...)(X expr) |
59 | 59 | { |
60 | 60 | alias X[0] var1; |
61 | - asm { "%0" : "=m" var1; } // { dg-error "double 'double' is a type, not an lvalue" } | |
61 | + asm { "%0" : "=m" (var1); } // { dg-error "double 'double' is a type, not an lvalue" } | |
62 | 62 | } |
63 | 63 | |
64 | 64 | void semantic2() |
@@ -86,6 +86,6 @@ void semantic4() | ||
86 | 86 | { |
87 | 87 | asm |
88 | 88 | { |
89 | - "%0" : : "m" S4.foo; // { dg-error "template instance opDispatch!\"foo\" has no value" } | |
89 | + "%0" : : "m" (S4.foo); // { dg-error "template instance opDispatch!\"foo\" has no value" } | |
90 | 90 | } |
91 | 91 | } |
@@ -250,7 +250,7 @@ class C204 : I204 | ||
250 | 250 | // https://bugzilla.gdcproject.org/show_bug.cgi?id=241 |
251 | 251 | |
252 | 252 | import imports.gdc241a; |
253 | -import imports.gdc241b : S241, C241, E241, N241; | |
253 | +public import imports.gdc241b : S241, C241, E241, N241; | |
254 | 254 | |
255 | 255 | /******************************************/ |
256 | 256 | // https://bugzilla.gdcproject.org/show_bug.cgi?id=242 |
@@ -46,7 +46,7 @@ struct S61b | ||
46 | 46 | { |
47 | 47 | try |
48 | 48 | other.a(); |
49 | - catch | |
49 | + catch (Throwable) | |
50 | 50 | other.b(); |
51 | 51 | } |
52 | 52 | } |
@@ -243,7 +243,7 @@ void test36b()(char val) | ||
243 | 243 | auto test36c_1() |
244 | 244 | { |
245 | 245 | int a; |
246 | - void c() {}; | |
246 | + void c() {} | |
247 | 247 | class Result |
248 | 248 | { |
249 | 249 | int b; |
@@ -1,4 +1,4 @@ | ||
1 | -5cc061a8733731d5b40334c0eb7a927b6d6241ce | |
1 | +d05ebaad15fbffce6d707c138c84d7b60fcf5ffd | |
2 | 2 | |
3 | 3 | The first line of this file holds the git revision number of the last |
4 | 4 | merge done from the dlang/druntime repository. |
@@ -651,9 +651,9 @@ string toUTF8(in wchar[] s) | ||
651 | 651 | else |
652 | 652 | { |
653 | 653 | r.length = i; |
654 | - foreach (dchar c; s[i .. slen]) | |
654 | + foreach (dchar ch; s[i .. slen]) | |
655 | 655 | { |
656 | - encode(r, c); | |
656 | + encode(r, ch); | |
657 | 657 | } |
658 | 658 | break; |
659 | 659 | } |
@@ -1,4 +1,4 @@ | ||
1 | -64ed4684fa2a0f2401f5b6df34f6dcb4c3973945 | |
1 | +021ae0df76727a32809a29887095ab7093489ea3 | |
2 | 2 | |
3 | 3 | The first line of this file holds the git revision number of the last |
4 | 4 | merge done from the dlang/phobos repository. |
@@ -4874,7 +4874,7 @@ if (allSatisfy!(isInputRange, Ranges)) | ||
4874 | 4874 | // Just make sure 1-range case instantiates. This hangs the compiler |
4875 | 4875 | // when no explicit stopping policy is specified due to Bug 4652. |
4876 | 4876 | auto stuff = lockstep([1,2,3,4,5], StoppingPolicy.shortest); |
4877 | - foreach (int i, a; stuff) | |
4877 | + foreach (i, a; stuff) | |
4878 | 4878 | { |
4879 | 4879 | assert(stuff[i] == a); |
4880 | 4880 | } |
@@ -2,7 +2,7 @@ module structalign; | ||
2 | 2 | |
3 | 3 | void main () |
4 | 4 | { |
5 | - struct K { int *a; }; | |
5 | + struct K { int *a; } | |
6 | 6 | K k; |
7 | 7 | auto ti = typeid (k); |
8 | 8 |