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.
This commit is contained in:
Iain Buclaw 2020-06-23 10:40:37 +02:00
parent 72acf751d8
commit 6948c7c3d2
10 changed files with 14 additions and 14 deletions

View File

@ -306,7 +306,7 @@ d_init_options (unsigned int, cl_decoded_option *decoded_options)
global.params.cplusplus = CppStdRevisionCpp14; global.params.cplusplus = CppStdRevisionCpp14;
/* Warnings and deprecations are disabled by default. */ /* Warnings and deprecations are disabled by default. */
global.params.useDeprecated = DIAGNOSTICoff; global.params.useDeprecated = DIAGNOSTICinform;
global.params.warnings = DIAGNOSTICoff; global.params.warnings = DIAGNOSTICoff;
global.params.imppath = new Strings (); global.params.imppath = new Strings ();

View File

@ -13,8 +13,8 @@ void parse2()
{ {
asm asm
{ {
"" : : "g" 1 ? 2 : 3; "" : : "g" (1 ? 2 : 3);
"" : : "g" 1 ? 2 : : 3; "" : : "g" (1 ? 2 : :) 3;
// { dg-error "expression expected, not ':'" "" { target *-*-* } .-1 } // { dg-error "expression expected, not ':'" "" { target *-*-* } .-1 }
// { dg-error "expected constant string constraint for operand" "" { target *-*-* } .-2 } // { dg-error "expected constant string constraint for operand" "" { target *-*-* } .-2 }
} }
@ -58,7 +58,7 @@ void semantic1()
void semantic2a(X...)(X expr) void semantic2a(X...)(X expr)
{ {
alias X[0] var1; alias X[0] var1;
asm { "%0" : "=m" var1; } // { dg-error "double 'double' is a type, not an lvalue" } asm { "%0" : "=m" (var1); } // { dg-error "double 'double' is a type, not an lvalue" }
} }
void semantic2() void semantic2()
@ -86,6 +86,6 @@ void semantic4()
{ {
asm asm
{ {
"%0" : : "m" S4.foo; // { dg-error "template instance opDispatch!\"foo\" has no value" } "%0" : : "m" (S4.foo); // { dg-error "template instance opDispatch!\"foo\" has no value" }
} }
} }

View File

@ -250,7 +250,7 @@ class C204 : I204
// https://bugzilla.gdcproject.org/show_bug.cgi?id=241 // https://bugzilla.gdcproject.org/show_bug.cgi?id=241
import imports.gdc241a; import imports.gdc241a;
import imports.gdc241b : S241, C241, E241, N241; public import imports.gdc241b : S241, C241, E241, N241;
/******************************************/ /******************************************/
// https://bugzilla.gdcproject.org/show_bug.cgi?id=242 // https://bugzilla.gdcproject.org/show_bug.cgi?id=242

View File

@ -46,7 +46,7 @@ struct S61b
{ {
try try
other.a(); other.a();
catch catch (Throwable)
other.b(); other.b();
} }
} }

View File

@ -243,7 +243,7 @@ void test36b()(char val)
auto test36c_1() auto test36c_1()
{ {
int a; int a;
void c() {}; void c() {}
class Result class Result
{ {
int b; int b;

View File

@ -1,4 +1,4 @@
5cc061a8733731d5b40334c0eb7a927b6d6241ce d05ebaad15fbffce6d707c138c84d7b60fcf5ffd
The first line of this file holds the git revision number of the last The first line of this file holds the git revision number of the last
merge done from the dlang/druntime repository. merge done from the dlang/druntime repository.

View File

@ -651,9 +651,9 @@ string toUTF8(in wchar[] s)
else else
{ {
r.length = i; r.length = i;
foreach (dchar c; s[i .. slen]) foreach (dchar ch; s[i .. slen])
{ {
encode(r, c); encode(r, ch);
} }
break; break;
} }

View File

@ -1,4 +1,4 @@
64ed4684fa2a0f2401f5b6df34f6dcb4c3973945 021ae0df76727a32809a29887095ab7093489ea3
The first line of this file holds the git revision number of the last The first line of this file holds the git revision number of the last
merge done from the dlang/phobos repository. merge done from the dlang/phobos repository.

View File

@ -4874,7 +4874,7 @@ if (allSatisfy!(isInputRange, Ranges))
// Just make sure 1-range case instantiates. This hangs the compiler // Just make sure 1-range case instantiates. This hangs the compiler
// when no explicit stopping policy is specified due to Bug 4652. // when no explicit stopping policy is specified due to Bug 4652.
auto stuff = lockstep([1,2,3,4,5], StoppingPolicy.shortest); auto stuff = lockstep([1,2,3,4,5], StoppingPolicy.shortest);
foreach (int i, a; stuff) foreach (i, a; stuff)
{ {
assert(stuff[i] == a); assert(stuff[i] == a);
} }

View File

@ -2,7 +2,7 @@ module structalign;
void main () void main ()
{ {
struct K { int *a; }; struct K { int *a; }
K k; K k;
auto ti = typeid (k); auto ti = typeid (k);