Commit 74462a6a by Arnaud Charlet

[multiple changes]

2009-07-22  Robert Dewar  <dewar@adacore.com>

	* gnat_ugn.texi: Minor reformatting

2009-07-22  Ed Schonberg  <schonberg@adacore.com>

	* errout.adb (Error_Msg): A style message within an instantiation
	should not be labelled as an error.

From-SVN: r149938
parent 8e5aa8a3
2009-07-22 Robert Dewar <dewar@adacore.com>
* gnat_ugn.texi: Minor reformatting
2009-07-22 Ed Schonberg <schonberg@adacore.com>
* errout.adb (Error_Msg): A style message within an instantiation
should not be labelled as an error.
2009-07-22 Ed Schonberg <schonberg@adacore.com> 2009-07-22 Ed Schonberg <schonberg@adacore.com>
* freeze.adb (Freeze_Entity): Do not generate extra formal for function * freeze.adb (Freeze_Entity): Do not generate extra formal for function
......
...@@ -439,7 +439,7 @@ package body Errout is ...@@ -439,7 +439,7 @@ package body Errout is
-- Case of inlined body -- Case of inlined body
if Inlined_Body (X) then if Inlined_Body (X) then
if Is_Warning_Msg then if Is_Warning_Msg or else Is_Style_Msg then
Error_Msg_Internal Error_Msg_Internal
("?in inlined body #", ("?in inlined body #",
Actual_Error_Loc, Flag_Location, Msg_Cont_Status); Actual_Error_Loc, Flag_Location, Msg_Cont_Status);
...@@ -453,7 +453,7 @@ package body Errout is ...@@ -453,7 +453,7 @@ package body Errout is
-- Case of generic instantiation -- Case of generic instantiation
else else
if Is_Warning_Msg then if Is_Warning_Msg or else Is_Style_Msg then
Error_Msg_Internal Error_Msg_Internal
("?in instantiation #", ("?in instantiation #",
Actual_Error_Loc, Flag_Location, Msg_Cont_Status); Actual_Error_Loc, Flag_Location, Msg_Cont_Status);
...@@ -684,9 +684,7 @@ package body Errout is ...@@ -684,9 +684,7 @@ package body Errout is
-- performed if we find a serious error. This is skipped if we -- performed if we find a serious error. This is skipped if we
-- are currently dealing with the configuration pragma file. -- are currently dealing with the configuration pragma file.
if not Try_Semantics if not Try_Semantics and then Current_Source_Unit /= No_Unit then
and then Current_Source_Unit /= No_Unit
then
Set_Fatal_Error (Get_Source_Unit (Sptr)); Set_Fatal_Error (Get_Source_Unit (Sptr));
end if; end if;
end Handle_Serious_Error; end Handle_Serious_Error;
...@@ -714,8 +712,8 @@ package body Errout is ...@@ -714,8 +712,8 @@ package body Errout is
if Suppress_Message if Suppress_Message
and then not All_Errors_Mode and then not All_Errors_Mode
and then not (Msg (Msg'Last) = '!')
and then not Is_Warning_Msg and then not Is_Warning_Msg
and then Msg (Msg'Last) /= '!'
then then
if not Continuation then if not Continuation then
Last_Killed := True; Last_Killed := True;
...@@ -746,9 +744,7 @@ package body Errout is ...@@ -746,9 +744,7 @@ package body Errout is
-- Immediate return if warning message and warnings are suppressed -- Immediate return if warning message and warnings are suppressed
if Warnings_Suppressed (Optr) if Warnings_Suppressed (Optr) or else Warnings_Suppressed (Sptr) then
or else Warnings_Suppressed (Sptr)
then
Cur_Msg := No_Error_Msg; Cur_Msg := No_Error_Msg;
return; return;
end if; end if;
...@@ -763,9 +759,7 @@ package body Errout is ...@@ -763,9 +759,7 @@ package body Errout is
-- then we want to eliminate the warning, unless it is in the -- then we want to eliminate the warning, unless it is in the
-- extended main code unit and we want warnings on the instance. -- extended main code unit and we want warnings on the instance.
elsif In_Extended_Main_Code_Unit (Sptr) elsif In_Extended_Main_Code_Unit (Sptr) and then Warn_On_Instance then
and then Warn_On_Instance
then
null; null;
-- Keep warning if debug flag G set -- Keep warning if debug flag G set
...@@ -829,14 +823,16 @@ package body Errout is ...@@ -829,14 +823,16 @@ package body Errout is
if Msglen > 8 and then Msg_Buffer (1 .. 8) = "(style) " then if Msglen > 8 and then Msg_Buffer (1 .. 8) = "(style) " then
M := 9; M := 9;
elsif Msglen > 6 and then Msg_Buffer (1 .. 6) = "info: " then elsif Msglen > 6 and then Msg_Buffer (1 .. 6) = "info: " then
M := 7; M := 7;
else else
M := 1; M := 1;
end if; end if;
-- Now deal with separation between messages. Normally this -- Now deal with separation between messages. Normally this is
-- is simply comma space, but there are some special cases. -- simply comma space, but there are some special cases.
-- If continuation new line, then put actual NL character in msg -- If continuation new line, then put actual NL character in msg
...@@ -885,21 +881,21 @@ package body Errout is ...@@ -885,21 +881,21 @@ package body Errout is
-- Otherwise build error message object for new message -- Otherwise build error message object for new message
Errors.Increment_Last; Errors.Append
((Text => new String'(Msg_Buffer (1 .. Msglen)),
Next => No_Error_Msg,
Sptr => Sptr,
Optr => Optr,
Sfile => Get_Source_File_Index (Sptr),
Line => Get_Physical_Line_Number (Sptr),
Col => Get_Column_Number (Sptr),
Warn => Is_Warning_Msg,
Style => Is_Style_Msg,
Serious => Is_Serious_Error,
Uncond => Is_Unconditional_Msg,
Msg_Cont => Continuation,
Deleted => False));
Cur_Msg := Errors.Last; Cur_Msg := Errors.Last;
Errors.Table (Cur_Msg).Text := new String'(Msg_Buffer (1 .. Msglen));
Errors.Table (Cur_Msg).Next := No_Error_Msg;
Errors.Table (Cur_Msg).Sptr := Sptr;
Errors.Table (Cur_Msg).Optr := Optr;
Errors.Table (Cur_Msg).Sfile := Get_Source_File_Index (Sptr);
Errors.Table (Cur_Msg).Line := Get_Physical_Line_Number (Sptr);
Errors.Table (Cur_Msg).Col := Get_Column_Number (Sptr);
Errors.Table (Cur_Msg).Warn := Is_Warning_Msg;
Errors.Table (Cur_Msg).Style := Is_Style_Msg;
Errors.Table (Cur_Msg).Serious := Is_Serious_Error;
Errors.Table (Cur_Msg).Uncond := Is_Unconditional_Msg;
Errors.Table (Cur_Msg).Msg_Cont := Continuation;
Errors.Table (Cur_Msg).Deleted := False;
-- If immediate errors mode set, output error message now. Also output -- If immediate errors mode set, output error message now. Also output
-- now if the -d1 debug flag is set (so node number message comes out -- now if the -d1 debug flag is set (so node number message comes out
...@@ -1385,9 +1381,8 @@ package body Errout is ...@@ -1385,9 +1381,8 @@ package body Errout is
Specific_Warnings.Init; Specific_Warnings.Init;
if Warning_Mode = Suppress then if Warning_Mode = Suppress then
Warnings.Increment_Last; Warnings.Append
Warnings.Table (Warnings.Last).Start := Source_Ptr'First; ((Start => Source_Ptr'First, Stop => Source_Ptr'Last));
Warnings.Table (Warnings.Last).Stop := Source_Ptr'Last;
end if; end if;
end Initialize; end Initialize;
......
...@@ -16318,7 +16318,8 @@ case if the spec occupies more then one line. ...@@ -16318,7 +16318,8 @@ case if the spec occupies more then one line.
@cindex @option{^--separate-label^/SEPARATE_LABEL^} (@command{gnatpp}) @cindex @option{^--separate-label^/SEPARATE_LABEL^} (@command{gnatpp})
@item ^--separate-label^/SEPARATE_LABEL^ @item ^--separate-label^/SEPARATE_LABEL^
Place the satemement label(s) and the statement itself on separate lines. Place statement label(s) on a separate line, with the following statement
on the next line.
@cindex @option{^--separate-loop-then^/SEPARATE_LOOP_THEN^} (@command{gnatpp}) @cindex @option{^--separate-loop-then^/SEPARATE_LOOP_THEN^} (@command{gnatpp})
@item ^--separate-loop-then^/SEPARATE_LOOP_THEN^ @item ^--separate-loop-then^/SEPARATE_LOOP_THEN^
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment