From: Arnaud Charlet Date: Tue, 14 Jun 2016 12:20:01 +0000 (+0200) Subject: [multiple changes] X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=44900051ac48c87701dbbf3d485386013d56c97c;p=gcc.git [multiple changes] 2016-06-14 Ed Schonberg * sem_ch12.adb (Analyze_Associations): An actual parameter with a box must be included in the count of actuals, to detect possible superfluous named actuals that do not match any of the formals of the generic unit in a formal package declaration. 2016-06-14 Justin Squirek * sem_ch3.adb (Analyze_Object_Declaration): Fix formatting of error output related to SPARK RM 6.1.7(3) and pragma Extensions_Visible. * sem_ch4.adb (Analyze_Type_Conversion): Fix formatting of error output related to SPARK RM 6.1.7(3) and pragma Extensions_Visible. * sem_prag.adb (Analyze_Pragma): Fix formatting of error output related to SPARK RM 7.1.2(15) and pragma Volatile_Function so that the values True and False are no longer surrounded by double quotes. * sem_res.adb (Resolve_Actuals): Fix formatting of error output related to SPARK RM 6.1.7(3) and pragma Extensions_Visible. 2016-06-14 Arnaud Charlet * gnat1drv.adb (Adjust_Global_Switches): Enable access checks in codepeer mode. * freeze.adb: Minor grammar fix in comment. From-SVN: r237433 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index d2d8fa4df46..80537b66463 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,29 @@ +2016-06-14 Ed Schonberg + + * sem_ch12.adb (Analyze_Associations): An actual parameter + with a box must be included in the count of actuals, to detect + possible superfluous named actuals that do not match any of the + formals of the generic unit in a formal package declaration. + +2016-06-14 Justin Squirek + + * sem_ch3.adb (Analyze_Object_Declaration): Fix formatting + of error output related to SPARK RM 6.1.7(3) and pragma + Extensions_Visible. + * sem_ch4.adb (Analyze_Type_Conversion): Fix formatting of error + output related to SPARK RM 6.1.7(3) and pragma Extensions_Visible. + * sem_prag.adb (Analyze_Pragma): Fix formatting of error output + related to SPARK RM 7.1.2(15) and pragma Volatile_Function + so that the values True and False are no longer surrounded by + double quotes. + * sem_res.adb (Resolve_Actuals): Fix formatting of error output + related to SPARK RM 6.1.7(3) and pragma Extensions_Visible. + +2016-06-14 Arnaud Charlet + + * gnat1drv.adb (Adjust_Global_Switches): Enable access checks + in codepeer mode. + * freeze.adb: Minor grammar fix in comment. 2016-06-14 Hristian Kirtchev * lib.adb: Minor reformatting. diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index 66396c562be..ff3f063113f 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -8073,7 +8073,7 @@ package body Freeze is -- Else construct and analyze the body of a wrapper procedure -- that contains an object declaration to hold the expression. - -- Given that this is done only to complete the analysis, it + -- Given that this is done only to complete the analysis, it is -- simpler to build a procedure than a function which might -- involve secondary stack expansion. diff --git a/gcc/ada/gnat1drv.adb b/gcc/ada/gnat1drv.adb index 7089c8bc088..7da8e9a52a7 100644 --- a/gcc/ada/gnat1drv.adb +++ b/gcc/ada/gnat1drv.adb @@ -267,8 +267,7 @@ procedure Gnat1drv is -- Enable all other language checks Suppress_Options.Suppress := - (Access_Check => True, - Alignment_Check => True, + (Alignment_Check => True, Division_Check => True, Elaboration_Check => True, others => False); diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb index ac0ba4d86d9..6c0567ecc4d 100644 --- a/gcc/ada/sem_ch12.adb +++ b/gcc/ada/sem_ch12.adb @@ -1496,10 +1496,13 @@ package body Sem_Ch12 is -- A named association may lack an actual parameter, if it was -- introduced for a default subprogram that turns out to be local - -- to the outer instantiation. + -- to the outer instantiation. If it has a box association it must + -- correspond to some formal in the generic. if Nkind (Named) /= N_Others_Choice - and then Present (Explicit_Generic_Actual_Parameter (Named)) + and then + (Present (Explicit_Generic_Actual_Parameter (Named)) + or else Box_Present (Named)) then Num_Actuals := Num_Actuals + 1; end if; diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 642b880c8c5..17ac948651b 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -3796,8 +3796,8 @@ package body Sem_Ch3 is and then Is_EVF_Expression (E) then Error_Msg_N - ("formal parameter with Extensions_Visible False cannot be " - & "implicitly converted to class-wide type", E); + ("formal parameter cannot be implicitly converted to " + & "class-wide type when Extensions_Visible is False", E); end if; end if; diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb index dd140c165cb..33e3091e8e9 100644 --- a/gcc/ada/sem_ch4.adb +++ b/gcc/ada/sem_ch4.adb @@ -5246,8 +5246,8 @@ package body Sem_Ch4 is and then Is_EVF_Expression (Expr) then Error_Msg_N - ("formal parameter with Extensions_Visible False cannot be " - & "converted to class-wide type", Expr); + ("formal parameter cannot be converted to class-wide type when " + & "Extensions_Visible is False", Expr); end if; end Analyze_Type_Conversion; diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index e22d7987c42..c798929b71c 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -22821,12 +22821,12 @@ package body Sem_Prag is Error_Msg_Sloc := Sloc (Over_Id); Error_Msg_N - ("\& declared # with Volatile_Function value `False`", + ("\& declared # with Volatile_Function value False", Spec_Id); Error_Msg_Sloc := Sloc (Spec_Id); Error_Msg_N - ("\overridden # with Volatile_Function value `True`", + ("\overridden # with Volatile_Function value True", Spec_Id); end if; diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index aadf594114f..1d73bf462a1 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -4596,8 +4596,8 @@ package body Sem_Res is Extensions_Visible_True then Error_Msg_N - ("formal parameter with Extensions_Visible False cannot act " - & "as actual parameter", A); + ("formal parameter cannot act as actual parameter when " + & "Extensions_Visible is False", A); Error_Msg_NE ("\subprogram & has Extensions_Visible True", A, Nam); end if;