aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2020-04-28 20:51:51 +0200
committerGiuliano Belinassi <giuliano.belinassi@usp.br>2020-08-17 13:14:06 -0300
commit3c936c8248ab2314f34db7bed1ad686433deed06 (patch)
tree7e183eccc2fb5a0f2b9c9fde5834e0ad9537522b /gcc
parentbda5ce5b471cf2873575c9c7fa110a9875b3f810 (diff)
downloadgcc-3c936c8248ab2314f34db7bed1ad686433deed06.zip
gcc-3c936c8248ab2314f34db7bed1ad686433deed06.tar.gz
gcc-3c936c8248ab2314f34db7bed1ad686433deed06.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')
-rw-r--r--gcc/ada/sem_prag.adb13
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;