GNAT0006 =>
(Status => Active,
Human_Id => new String'("Mixed_Container_Aggregate_Error"),
- Switch => No_Switch_Id));
+ Switch => No_Switch_Id),
+ GNAT0007 =>
+ (Status => Active,
+ Human_Id => new String'("Volatile_Not_Modifed_Warning"),
+ Switch => gnatwk),
+ GNAT0008 =>
+ (Status => Active,
+ Human_Id => new String'("Variable_Not_Modifed_Warning"),
+ Switch => gnatwk),
+ GNAT0009 =>
+ (Status => Active,
+ Human_Id => new String'("In_Out_Not_Modifed_Warning"),
+ Switch => gnatwk));
end Errid.Diagnostic_Repository;
Short_Name => new String'("gnatwk"),
Description => null,
Documentation_Url => null,
- Diagnostics => null),
+ Diagnostics =>
+ new Diagnostic_Id_Array'(GNAT0007, GNAT0008, GNAT0009)),
gnatwl =>
(Human_Id => new String'("Elab_Warnings"),
Status => Active,
with Debug; use Debug;
with Einfo.Entities; use Einfo.Entities;
with Einfo.Utils; use Einfo.Utils;
+with Errid; use Errid;
with Errout; use Errout;
with Exp_Code; use Exp_Code;
with Lib; use Lib;
then
Error_Msg_N
("?k?& is not modified, consider pragma Export for "
- & "volatile variable!", E1);
+ & "volatile variable!",
+ E1,
+ GNAT0007);
-- Another special case, Exception_Occurrence, this catches
-- the case of exception choice (and a bit more too, but not
then
Error_Msg_N -- CODEFIX
("?k?& is not modified, could be declared constant!",
- E1);
+ E1,
+ GNAT0008);
end if;
-- Other cases of a variable or parameter never set in source
if not Is_Trivial_Subprogram (Scope (E1)) then
if Warn_On_Constant then
Error_Msg_N
- ("?k?formal parameter & is not modified!", E1);
+ ("?k?formal parameter & is not modified!",
+ E1,
+ GNAT0009);
Error_Msg_N
("\?k?mode could be IN instead of `IN OUT`!", E1);