+2019-12-16 Bob Duff <duff@adacore.com>
+
+ * errout.ads, errout.adb (Is_Size_Too_Small_Message): Check for
+ "size for" instead of "size for& too small, minimum allowed is
+ ^".
+
2019-12-16 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch13.adb (Analyze_Attribute_Definition_Clause): Set only
Specific_Warnings.Init;
end Initialize;
+ -------------------------------
+ -- Is_Size_Too_Small_Message --
+ -------------------------------
+
+ function Is_Size_Too_Small_Message (S : String) return Boolean is
+ Size_For : constant String := "size for";
+ begin
+ return S'Length >= Size_For'Length
+ and then S (S'First .. S'First + Size_For'Length - 1) = Size_For;
+ end Is_Size_Too_Small_Message;
+
-----------------
-- No_Warnings --
-----------------
-- Processing for "Size too small" messages
- elsif Msg = Size_Too_Small_Message then
+ elsif Is_Size_Too_Small_Message (Msg) then
-- Suppress "size too small" errors in CodePeer mode, since code may
-- be analyzed in a different configuration than the one used for
-- WARNING: There is a matching C declaration of this subprogram in fe.h
+ function Is_Size_Too_Small_Message (S : String) return Boolean;
Size_Too_Small_Message : constant String :=
"size for& too small, minimum allowed is ^";
-- This message is explicitly tested in Special_Msg_Delete in the package