diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2020-04-28 20:51:51 +0200 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-06-19 04:17:13 -0400 |
commit | a5835f304466352bf180d851591df6975dcb42b8 (patch) | |
tree | 0b6222956fdfd164b39dfe241b8c1228bcf7b2ba /gcc/ada | |
parent | ec170be1d06841841ef2fbcbab7ae14cf8571d5a (diff) | |
download | gcc-a5835f304466352bf180d851591df6975dcb42b8.zip gcc-a5835f304466352bf180d851591df6975dcb42b8.tar.gz gcc-a5835f304466352bf180d851591df6975dcb42b8.tar.bz2 |
[Ada] Remove second warning for convention C_Variadic_n
2020-06-19 Eric Botcazou <ebotcazou@adacore.com>
gcc/ada/
* sem_prag.adb (Process_Convention): Revert previous change.
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/sem_prag.adb | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index e9cfb13..b3d128b 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -8304,7 +8304,8 @@ package body Sem_Prag is ("??C_Variadic_0 cannot be used for an 'I'S'O C function", Get_Pragma_Arg (Arg2)); - -- Now check the number of parameters of the subprogram + -- Now check the number of parameters of the subprogram and give + -- an error if it is lower than n. elsif Present (Subp) then declare @@ -8323,21 +8324,11 @@ package body Sem_Prag is Next_Formal (Formal); end loop; - -- Error out if the number of parameters is lower than n - if Count < Minimum then Error_Msg_Uint_1 := UI_From_Int (Minimum); Error_Pragma_Arg ("argument of pragma% must have at least" & "^ parameters", Arg2); - - -- But warn if it is exactly n because this is useless - - elsif Count = Minimum then - Error_Msg_Uint_1 := UI_From_Int (Minimum + 1); - Error_Msg_N - ("??subprogram should have at least ^ parameters", - Get_Pragma_Arg (Arg2)); end if; end; end if; |