variables whose name contains one of the substrings
``DISCARD, DUMMY, IGNORE, JUNK, UNUSED`` in any casing. Such names
are typically to be used in cases where such warnings are expected.
-Thus it is never necessary to use ``pragma Unmodified`` for such
+Thus it is never necessary to use ``pragma Unused`` for such
variables, though it is harmless to do so.
Pragma Validity_Checks
@copying
@quotation
-GNAT Reference Manual , Jan 03, 2022
+GNAT Reference Manual , Apr 22, 2022
AdaCore
variables whose name contains one of the substrings
@code{DISCARD, DUMMY, IGNORE, JUNK, UNUSED} in any casing. Such names
are typically to be used in cases where such warnings are expected.
-Thus it is never necessary to use @code{pragma Unmodified} for such
+Thus it is never necessary to use @code{pragma Unused} for such
variables, though it is harmless to do so.
@node Pragma Validity_Checks,Pragma Volatile,Pragma Unused,Implementation Defined Pragmas
if Chars (BE) = Chars (E) then
if Has_Pragma_Unused (E) then
Error_Msg_NE -- CODEFIX
- ("??pragma Unused given for&!", N, BE);
+ ("??aspect Unused specified for&!", N, BE);
else
Error_Msg_NE -- CODEFIX
- ("??pragma Unreferenced given for&!", N, BE);
+ ("??aspect Unreferenced specified for&!", N, BE);
end if;
exit;
end if;
elsif Has_Pragma_Unused (E) then
Error_Msg_NE -- CODEFIX
- ("??pragma Unused given for&!", N, E);
+ ("??aspect Unused specified for&!", N, E);
else
Error_Msg_NE -- CODEFIX
- ("??pragma Unreferenced given for&!", N, E);
+ ("??aspect Unreferenced specified for&!", N, E);
end if;
end if;
elsif Has_Pragma_Unmodified (Arg_Id) then
if Has_Pragma_Unused (Arg_Id) then
Error_Msg_NE
- ("??pragma Unused already given for &!", Arg_Expr,
- Arg_Id);
+ (Fix_Error ("??pragma Unused already given for &!"),
+ Arg_Expr, Arg_Id);
else
Error_Msg_NE
- ("??pragma Unmodified already given for &!", Arg_Expr,
- Arg_Id);
+ (Fix_Error ("??pragma Unmodified already given for &!"),
+ Arg_Expr, Arg_Id);
end if;
-- Otherwise the pragma referenced an illegal entity
if Has_Pragma_Unreferenced (Arg_Id) then
if Has_Pragma_Unused (Arg_Id) then
Error_Msg_NE
- ("??pragma Unused already given for &!", Arg_Expr,
- Arg_Id);
+ (Fix_Error ("??pragma Unused already given for &!"),
+ Arg_Expr, Arg_Id);
else
Error_Msg_NE
- ("??pragma Unreferenced already given for &!",
- Arg_Expr, Arg_Id);
+ (Fix_Error
+ ("??pragma Unreferenced already given for &!"),
+ Arg_Expr, Arg_Id);
end if;
-- Apply Unreferenced to the entity
-- of pragma Unused.
if Has_Pragma_Unused (Ent) then
- Error_Msg_NE ("??pragma Unused given for &!", N, Ent);
+ Error_Msg_NE
+ ("??aspect Unused specified for &!", N, Ent);
else
Error_Msg_NE
- ("??pragma Unmodified given for &!", N, Ent);
+ ("??aspect Unmodified specified for &!", N, Ent);
end if;
end if;