This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] Improved handling of info messages


The count of info messages is now separated from the count of warnings
and -gnatwe never turns info messages into errors. The following
compiles as shown, and generates object code since no error is found
when compilation options -gnatwe -gnatld7 -gnatj55 are used.

Compiling: infoerr.adb

     1. with Text_IO; use Text_IO;
     2. procedure InfoErr is
     3.    J : Natural;
     4. begin
     5.    J := 1;
     6.    <<ENTER>>
           |
        >>> info: code between label and backwards
            goto rewritten as loop

     7.    Put_Line (J'Img);
     8.    J := J + 1;
     9.    if J > 3 then
    10.       goto DONE;
    11.    end if;
    12.    goto ENTER;
    13.    <<DONE>>
    14.    null;
    15. end;

 15 lines: No errors, 1 info message

Tested on x86_64-pc-linux-gnu, committed on trunk

2014-08-01  Robert Dewar  <dewar@adacore.com>

	* atree.ads (Info_Messages): New counter.
	* err_vars.ads: Minor comment update.
	* errout.adb (Delete_Warning_And_Continuations): Deal
	with new Info_Messages counter.
	(Error_Msg_Internal): ditto.
	(Delete_Warning): ditto.
	(Initialize): ditto.
	(Write_Error_Summary): ditto.
	(Output_Messages): ditto.
	(To_Be_Removed): ditto.
	* erroutc.adb (Delete_Msg): Deal with Info_Messages counter.
	(Compilation_Errors): ditto.
	* errutil.adb (Error_Msg): Deal with Info_Messages counter.
	(Finalize): ditto.
	(Initialize): ditto.
	* sem_prag.adb (Analyze_Pragma): Minor comment addition.
	* gnat_ugn.texi: Document that -gnatwe does not affect info
	messages.

Attachment: difs
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]