From f6d606c7e717b3c842b96a72c0afcc84b82b7c53 Mon Sep 17 00:00:00 2001 From: Daniel Mercier Date: Mon, 8 Jul 2019 08:14:11 +0000 Subject: [PATCH] [Ada] Suppress warnings on memory representation in CodePeer mode 2019-07-08 Daniel Mercier gcc/ada/ * gnat1drv.adb: Suppress warnings on memory representation in CodePeer compiler mode. From-SVN: r273215 --- gcc/ada/ChangeLog | 5 +++++ gcc/ada/gnat1drv.adb | 18 +++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 57869d32bda..6ed43390ea2 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2019-07-08 Daniel Mercier + + * gnat1drv.adb: Suppress warnings on memory representation in + CodePeer compiler mode. + 2019-07-08 Nicolas Roche * rtinit.c (__gnat_runtime_initialize): Remove dependency on diff --git a/gcc/ada/gnat1drv.adb b/gcc/ada/gnat1drv.adb index 572ce3d4bbb..86d6be2c14f 100644 --- a/gcc/ada/gnat1drv.adb +++ b/gcc/ada/gnat1drv.adb @@ -82,6 +82,7 @@ with Uname; use Uname; with Urealp; with Usage; with Validsw; use Validsw; +with Warnsw; use Warnsw; with System.Assertions; with System.OS_Lib; @@ -403,7 +404,22 @@ procedure Gnat1drv is Relaxed_RM_Semantics := True; - if not Generate_CodePeer_Messages then + if Generate_CodePeer_Messages then + + -- We do want to emit GNAT warnings when using -gnateC. But, + -- in CodePeer mode, warnings about memory representation are not + -- meaningful, thus, suppress them. + + Warn_On_Biased_Representation := False; -- -gnatw.b + Warn_On_Unrepped_Components := False; -- -gnatw.c + Warn_On_Record_Holes := False; -- -gnatw.h + Warn_On_Unchecked_Conversion := False; -- -gnatwz + Warn_On_Size_Alignment := False; -- -gnatw.z + Warn_On_Questionable_Layout := False; -- -gnatw.q + Warn_On_Overridden_Size := False; -- -gnatw.s + Warn_On_Reverse_Bit_Order := False; -- -gnatw.v + + else -- Suppress compiler warnings by default when generating SCIL for -- CodePeer, except when combined with -gnateC where we do want to -- 2.30.2