d: Enable miscellaneous warnings by -Wextra flag
authorIain Buclaw <ibuclaw@gdcproject.org>
Tue, 8 Sep 2020 16:22:04 +0000 (18:22 +0200)
committerIain Buclaw <ibuclaw@gdcproject.org>
Thu, 10 Sep 2020 16:04:11 +0000 (18:04 +0200)
These warnings are handled outside of the D core language front-end, so
shouldn't be enabled by -Wall.

gcc/d/ChangeLog:

* lang.opt (Waddress): Enable warning by -Wextra.
(Wcast-result): Likewise.
(Wunknown-pragmas): Likewise.

gcc/d/lang.opt

index ade92d21cc62e40ca8c657fb80e7d425c0f175a2..b88fe6f301f05ff847638a87d0b27126250cd06b 100644 (file)
@@ -99,7 +99,7 @@ D Joined Separate
 ; Documented in C
 
 Waddress
-D Warning Var(warn_address)
+D Warning Var(warn_address) LangEnabledBy(D, Wextra)
 ; Documented in C
 
 Wall
@@ -119,7 +119,7 @@ D
 ; Documented in C
 
 Wcast-result
-D Warning Var(warn_cast_result)
+D Warning Var(warn_cast_result) LangEnabledBy(D, Wextra)
 Warn about casts that will produce a null result.
 
 Wdeprecated
@@ -143,7 +143,7 @@ D
 ; Documented in C
 
 Wunknown-pragmas
-D LangEnabledBy(D, Wall)
+D Var(warn_unknown_pragmas) LangEnabledBy(D, Wextra)
 ; Documented in C
 
 Wvarargs