comparison gcc/ada/errout.ads @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
4 -- -- 4 -- --
5 -- E R R O U T -- 5 -- E R R O U T --
6 -- -- 6 -- --
7 -- S p e c -- 7 -- S p e c --
8 -- -- 8 -- --
9 -- Copyright (C) 1992-2018, Free Software Foundation, Inc. -- 9 -- Copyright (C) 1992-2019, Free Software Foundation, Inc. --
10 -- -- 10 -- --
11 -- GNAT is free software; you can redistribute it and/or modify it under -- 11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- -- 12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- -- 13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- 14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
645 645
646 ----------------------- 646 -----------------------
647 -- CODEFIX Facility -- 647 -- CODEFIX Facility --
648 ----------------------- 648 -----------------------
649 649
650 -- The GPS and GNATBench IDE's have a codefix facility that allows for 650 -- The GNAT Studio and GNATBench IDE's have a codefix facility that allows
651 -- automatic correction of a subset of the errors and warnings issued 651 -- for automatic correction of a subset of the errors and warnings issued
652 -- by the compiler. This is done by recognizing the text of specific 652 -- by the compiler. This is done by recognizing the text of specific
653 -- messages using appropriate matching patterns. 653 -- messages using appropriate matching patterns.
654 654
655 -- The text of such messages should not be altered without coordinating 655 -- The text of such messages should not be altered without coordinating
656 -- with the codefix code. All such messages are marked by a specific 656 -- with the codefix code. All such messages are marked by a specific
732 -- error messages from the analyzer). The message text may contain a 732 -- error messages from the analyzer). The message text may contain a
733 -- single & insertion, which will reference the given node. The message is 733 -- single & insertion, which will reference the given node. The message is
734 -- suppressed if the node N already has a message posted, or if it is a 734 -- suppressed if the node N already has a message posted, or if it is a
735 -- warning and N is an entity node for which warnings are suppressed. 735 -- warning and N is an entity node for which warnings are suppressed.
736 736
737 -- WARNING: There is a matching C declaration of this subprogram in fe.h
738
737 procedure Error_Msg_F (Msg : String; N : Node_Id); 739 procedure Error_Msg_F (Msg : String; N : Node_Id);
738 -- Similar to Error_Msg_N except that the message is placed on the first 740 -- Similar to Error_Msg_N except that the message is placed on the first
739 -- node of the construct N (First_Node (N)). Note that this procedure uses 741 -- node of the construct N (First_Node (N)). Note that this procedure uses
740 -- Original_Node to look at the original source tree, since that's what we 742 -- Original_Node to look at the original source tree, since that's what we
741 -- want for placing an error message flag in the right place. 743 -- want for placing an error message flag in the right place.
747 -- Output a message at the Sloc of the given node N, with an insertion of 749 -- Output a message at the Sloc of the given node N, with an insertion of
748 -- the name from the given entity node E. This is used by the semantic 750 -- the name from the given entity node E. This is used by the semantic
749 -- routines, where this is a common error message situation. The Msg text 751 -- routines, where this is a common error message situation. The Msg text
750 -- will contain a & or } as usual to mark the insertion point. This 752 -- will contain a & or } as usual to mark the insertion point. This
751 -- routine can be called from the parser or the analyzer. 753 -- routine can be called from the parser or the analyzer.
754
755 -- WARNING: There is a matching C declaration of this subprogram in fe.h
752 756
753 procedure Error_Msg_FE 757 procedure Error_Msg_FE
754 (Msg : String; 758 (Msg : String;
755 N : Node_Id; 759 N : Node_Id;
756 E : Node_Or_Entity_Id); 760 E : Node_Or_Entity_Id);
946 -- source file referenced by the corresponding source location value. On 950 -- source file referenced by the corresponding source location value. On
947 -- return, the name is in Name_Buffer, null terminated with Name_Len set. 951 -- return, the name is in Name_Buffer, null terminated with Name_Len set.
948 -- This name is the identifier name as passed, cased according to the 952 -- This name is the identifier name as passed, cased according to the
949 -- default identifier casing for the given file. 953 -- default identifier casing for the given file.
950 954
955 -- WARNING: There is a matching C declaration of this subprogram in fe.h
956
957 function Is_Size_Too_Small_Message (S : String) return Boolean;
958 Size_Too_Small_Message : constant String :=
959 "size for& too small, minimum allowed is ^";
960 -- This message is printed in Freeze and Sem_Ch13. We also test for it in
961 -- the body of this package (see Special_Msg_Delete) ???which is somewhat
962 -- questionable. The Is_Size_Too_Small_Message function tests for it by
963 -- testing a prefix. The function and constant should be kept in synch.
964
951 end Errout; 965 end Errout;