diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2020-06-23 10:40:37 +0200 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gdcproject.org> | 2020-06-25 17:02:45 +0200 |
commit | 6948c7c3d29bf5892299550a19ce615a85ef9b2b (patch) | |
tree | 3ab9d80b327c79a5e3f1b611541c181d68949ce7 /gcc | |
parent | 72acf751d8eb41bab7a4d8b4dd74f8165b10cd71 (diff) | |
download | gcc-6948c7c3d29bf5892299550a19ce615a85ef9b2b.zip gcc-6948c7c3d29bf5892299550a19ce615a85ef9b2b.tar.gz gcc-6948c7c3d29bf5892299550a19ce615a85ef9b2b.tar.bz2 |
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.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/d/d-lang.cc | 2 | ||||
-rw-r--r-- | gcc/testsuite/gdc.dg/asm1.d | 8 | ||||
-rw-r--r-- | gcc/testsuite/gdc.dg/compilable.d | 2 | ||||
-rw-r--r-- | gcc/testsuite/gdc.dg/lto/ltotests_0.d | 2 | ||||
-rw-r--r-- | gcc/testsuite/gdc.dg/runnable.d | 2 |
5 files changed, 8 insertions, 8 deletions
diff --git a/gcc/d/d-lang.cc b/gcc/d/d-lang.cc index 82e24de..24a1125 100644 --- 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) global.params.cplusplus = CppStdRevisionCpp14; /* Warnings and deprecations are disabled by default. */ - global.params.useDeprecated = DIAGNOSTICoff; + global.params.useDeprecated = DIAGNOSTICinform; global.params.warnings = DIAGNOSTICoff; global.params.imppath = new Strings (); diff --git a/gcc/testsuite/gdc.dg/asm1.d b/gcc/testsuite/gdc.dg/asm1.d index 3fcfd6a..dce3676 100644 --- a/gcc/testsuite/gdc.dg/asm1.d +++ b/gcc/testsuite/gdc.dg/asm1.d @@ -13,8 +13,8 @@ void parse2() { 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 "expected constant string constraint for operand" "" { target *-*-* } .-2 } } @@ -58,7 +58,7 @@ void semantic1() void semantic2a(X...)(X expr) { 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() @@ -86,6 +86,6 @@ void semantic4() { 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" } } } diff --git a/gcc/testsuite/gdc.dg/compilable.d b/gcc/testsuite/gdc.dg/compilable.d index 92a1875..3f92f9b 100644 --- a/gcc/testsuite/gdc.dg/compilable.d +++ b/gcc/testsuite/gdc.dg/compilable.d @@ -250,7 +250,7 @@ class C204 : I204 // https://bugzilla.gdcproject.org/show_bug.cgi?id=241 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 diff --git a/gcc/testsuite/gdc.dg/lto/ltotests_0.d b/gcc/testsuite/gdc.dg/lto/ltotests_0.d index bb18bea..91737609 100644 --- a/gcc/testsuite/gdc.dg/lto/ltotests_0.d +++ b/gcc/testsuite/gdc.dg/lto/ltotests_0.d @@ -46,7 +46,7 @@ struct S61b { try other.a(); - catch + catch (Throwable) other.b(); } } diff --git a/gcc/testsuite/gdc.dg/runnable.d b/gcc/testsuite/gdc.dg/runnable.d index 7307e09..d974bda 100644 --- a/gcc/testsuite/gdc.dg/runnable.d +++ b/gcc/testsuite/gdc.dg/runnable.d @@ -243,7 +243,7 @@ void test36b()(char val) auto test36c_1() { int a; - void c() {}; + void c() {} class Result { int b; |