In GCC 14:
perl_c.c: In function ‘perl4caml_init’:
perl_c.c:97:25: error: passing argument 2 of ‘Perl_sys_init’ from incompatible pointer type [-Wincompatible-pointer-types]
97 | PERL_SYS_INIT (&argc, &argv);
| ^~~~~
| |
| char * (*)[5]
/usr/lib64/perl5/CORE/perl.h:3608:61: note: in definition of macro ‘PERL_SYS_INIT’
3608 | #define PERL_SYS_INIT(argc, argv) Perl_sys_init(argc, argv)
| ^~~~
In file included from /usr/lib64/perl5/CORE/perl.h:6188:
/usr/lib64/perl5/CORE/proto.h:4992:34: note: expected ‘char ***’ but argument is of type ‘char * (*)[5]’
4992 | Perl_sys_init(int *argc, char ***argv);
| ~~~~~~~~^~~~
int argc = 4;
static char *argv[] = { "", "-w", "-e", "0", NULL };
- PERL_SYS_INIT (&argc, &argv);
+ PERL_SYS_INIT (&argc, (char ***) &argv);
my_perl = perl_alloc ();
perl_construct (my_perl);
PL_exit_flags |= PERL_EXIT_DESTRUCT_END;