From 23c332e2a56dc93e3c00e745e08396762a33204e Mon Sep 17 00:00:00 2001 From: Viljar Indus Date: Mon, 13 May 2024 11:53:45 +0300 Subject: ada: Change messages for -gnatw.v to warnings Previously this switch was emitting only info messages which was both confusing in terms of the name of the switch that was used internally and externally. gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Update documentation for -gnatw.v. * sem_ch13.adb: Convert all -gnatw.v related messages to warnings. * gnat_ugn.texi: Regenerate. --- .../gnat_ugn/building_executable_programs_with_gnat.rst | 17 ++++++++--------- gcc/ada/gnat_ugn.texi | 17 ++++++++--------- gcc/ada/sem_ch13.adb | 10 +++++----- 3 files changed, 21 insertions(+), 23 deletions(-) diff --git a/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst b/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst index d30bb7e..ce3ed0c 100644 --- a/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst +++ b/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst @@ -3997,22 +3997,21 @@ of the pragma in the :title:`GNAT_Reference_manual`). .. index:: bit order warnings :switch:`-gnatw.v` - *Activate info messages for non-default bit order.* + *Activate warnings for non-default bit order.* - This switch activates messages (labeled "info", they are not warnings, - just informational messages) about the effects of non-default bit-order - on records to which a component clause is applied. The effect of specifying - non-default bit ordering is a bit subtle (and changed with Ada 2005), so - these messages, which are given by default, are useful in understanding the - exact consequences of using this feature. + This switch activates warning messages about the effects of non-default + bit-order on records to which a component clause is applied. The effect of + specifying non-default bit ordering is a bit subtle + (and changed with Ada 2005), so these messages, which are given by default, + are useful in understanding the exact consequences of using this feature. .. index:: -gnatw.V (gcc) :switch:`-gnatw.V` - *Suppress info messages for non-default bit order.* + *Suppress warnings for non-default bit order.* - This switch suppresses information messages for the effects of specifying + This switch suppresses warnings for the effects of specifying non-default bit order on record components with component clauses. diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index 95e2140..bba4f25 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -12462,14 +12462,13 @@ may not be properly initialized. @item @code{-gnatw.v} -`Activate info messages for non-default bit order.' +`Activate warnings for non-default bit order.' -This switch activates messages (labeled “info”, they are not warnings, -just informational messages) about the effects of non-default bit-order -on records to which a component clause is applied. The effect of specifying -non-default bit ordering is a bit subtle (and changed with Ada 2005), so -these messages, which are given by default, are useful in understanding the -exact consequences of using this feature. +This switch activates warning messages about the effects of non-default +bit-order on records to which a component clause is applied. The effect of +specifying non-default bit ordering is a bit subtle +(and changed with Ada 2005), so these messages, which are given by default, +are useful in understanding the exact consequences of using this feature. @end table @geindex -gnatw.V (gcc) @@ -12479,9 +12478,9 @@ exact consequences of using this feature. @item @code{-gnatw.V} -`Suppress info messages for non-default bit order.' +`Suppress warnings for non-default bit order.' -This switch suppresses information messages for the effects of specifying +This switch suppresses warnings for the effects of specifying non-default bit order on record components with component clauses. @end table diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index cd47f73..a35b67e 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -508,7 +508,7 @@ package body Sem_Ch13 is if Warn_On_Reverse_Bit_Order then Error_Msg_N - ("info: multi-byte field specified with " + ("multi-byte field specified with " & "non-standard Bit_Order?.v?", CC); if Bytes_Big_Endian then @@ -732,7 +732,7 @@ package body Sem_Ch13 is then Error_Msg_Uint_1 := MSS; Error_Msg_N - ("info: reverse bit order in machine scalar of " + ("reverse bit order in machine scalar of " & "length^?.v?", First_Bit (CC)); Error_Msg_Uint_1 := NFB; Error_Msg_Uint_2 := NLB; @@ -808,7 +808,7 @@ package body Sem_Ch13 is and then CSZ mod System_Storage_Unit = 0 then Error_Msg_N - ("info: multi-byte field specified with non-standard " + ("multi-byte field specified with non-standard " & "Bit_Order?.v?", CLC); if Bytes_Big_Endian then @@ -841,13 +841,13 @@ package body Sem_Ch13 is and then Warn_On_Reverse_Bit_Order then Error_Msg_N - ("info: Bit_Order clause does not affect byte " + ("Bit_Order clause does not affect byte " & "ordering?.v?", Pos); Error_Msg_Uint_1 := Intval (Pos) + Intval (FB) / System_Storage_Unit; Error_Msg_N - ("info: position normalized to ^ before bit order " + ("position normalized to ^ before bit order " & "interpreted?.v?", Pos); end if; -- cgit v1.1