• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GCC with patches for OS216


Commit MetaInfo

Revisión6948c7c3d29bf5892299550a19ce615a85ef9b2b (tree)
Tiempo2020-06-26 00:02:45
AutorIain Buclaw <ibuclaw@gdcp...>
CommiterIain Buclaw

Log Message

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.

Cambiar Resumen

Diferencia incremental

--- a/gcc/d/d-lang.cc
+++ b/gcc/d/d-lang.cc
@@ -306,7 +306,7 @@ d_init_options (unsigned int, cl_decoded_option *decoded_options)
306306 global.params.cplusplus = CppStdRevisionCpp14;
307307
308308 /* Warnings and deprecations are disabled by default. */
309- global.params.useDeprecated = DIAGNOSTICoff;
309+ global.params.useDeprecated = DIAGNOSTICinform;
310310 global.params.warnings = DIAGNOSTICoff;
311311
312312 global.params.imppath = new Strings ();
--- a/gcc/testsuite/gdc.dg/asm1.d
+++ b/gcc/testsuite/gdc.dg/asm1.d
@@ -13,8 +13,8 @@ void parse2()
1313 {
1414 asm
1515 {
16- "" : : "g" 1 ? 2 : 3;
17- "" : : "g" 1 ? 2 : : 3;
16+ "" : : "g" (1 ? 2 : 3);
17+ "" : : "g" (1 ? 2 : :) 3;
1818 // { dg-error "expression expected, not ':'" "" { target *-*-* } .-1 }
1919 // { dg-error "expected constant string constraint for operand" "" { target *-*-* } .-2 }
2020 }
@@ -58,7 +58,7 @@ void semantic1()
5858 void semantic2a(X...)(X expr)
5959 {
6060 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" }
6262 }
6363
6464 void semantic2()
@@ -86,6 +86,6 @@ void semantic4()
8686 {
8787 asm
8888 {
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" }
9090 }
9191 }
--- a/gcc/testsuite/gdc.dg/compilable.d
+++ b/gcc/testsuite/gdc.dg/compilable.d
@@ -250,7 +250,7 @@ class C204 : I204
250250 // https://bugzilla.gdcproject.org/show_bug.cgi?id=241
251251
252252 import imports.gdc241a;
253-import imports.gdc241b : S241, C241, E241, N241;
253+public import imports.gdc241b : S241, C241, E241, N241;
254254
255255 /******************************************/
256256 // https://bugzilla.gdcproject.org/show_bug.cgi?id=242
--- a/gcc/testsuite/gdc.dg/lto/ltotests_0.d
+++ b/gcc/testsuite/gdc.dg/lto/ltotests_0.d
@@ -46,7 +46,7 @@ struct S61b
4646 {
4747 try
4848 other.a();
49- catch
49+ catch (Throwable)
5050 other.b();
5151 }
5252 }
--- a/gcc/testsuite/gdc.dg/runnable.d
+++ b/gcc/testsuite/gdc.dg/runnable.d
@@ -243,7 +243,7 @@ void test36b()(char val)
243243 auto test36c_1()
244244 {
245245 int a;
246- void c() {};
246+ void c() {}
247247 class Result
248248 {
249249 int b;
--- a/libphobos/libdruntime/MERGE
+++ b/libphobos/libdruntime/MERGE
@@ -1,4 +1,4 @@
1-5cc061a8733731d5b40334c0eb7a927b6d6241ce
1+d05ebaad15fbffce6d707c138c84d7b60fcf5ffd
22
33 The first line of this file holds the git revision number of the last
44 merge done from the dlang/druntime repository.
--- a/libphobos/libdruntime/rt/util/utf.d
+++ b/libphobos/libdruntime/rt/util/utf.d
@@ -651,9 +651,9 @@ string toUTF8(in wchar[] s)
651651 else
652652 {
653653 r.length = i;
654- foreach (dchar c; s[i .. slen])
654+ foreach (dchar ch; s[i .. slen])
655655 {
656- encode(r, c);
656+ encode(r, ch);
657657 }
658658 break;
659659 }
--- a/libphobos/src/MERGE
+++ b/libphobos/src/MERGE
@@ -1,4 +1,4 @@
1-64ed4684fa2a0f2401f5b6df34f6dcb4c3973945
1+021ae0df76727a32809a29887095ab7093489ea3
22
33 The first line of this file holds the git revision number of the last
44 merge done from the dlang/phobos repository.
--- a/libphobos/src/std/range/package.d
+++ b/libphobos/src/std/range/package.d
@@ -4874,7 +4874,7 @@ if (allSatisfy!(isInputRange, Ranges))
48744874 // Just make sure 1-range case instantiates. This hangs the compiler
48754875 // when no explicit stopping policy is specified due to Bug 4652.
48764876 auto stuff = lockstep([1,2,3,4,5], StoppingPolicy.shortest);
4877- foreach (int i, a; stuff)
4877+ foreach (i, a; stuff)
48784878 {
48794879 assert(stuff[i] == a);
48804880 }
--- a/libphobos/testsuite/libphobos.typeinfo/struct-align.d
+++ b/libphobos/testsuite/libphobos.typeinfo/struct-align.d
@@ -2,7 +2,7 @@ module structalign;
22
33 void main ()
44 {
5- struct K { int *a; };
5+ struct K { int *a; }
66 K k;
77 auto ti = typeid (k);
88