https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112347
David Binderman <dcb314 at hotmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcb314 at hotmail dot com --- Comment #7 from David Binderman <dcb314 at hotmail dot com> --- Another test case: parse_args(char (**child_args_ptr_ptr)[]) { *child_args_ptr_ptr = calloc(1, sizeof(char)); } when compiled with -Wextra: $ ~/gcc/results/bin/gcc -c -Wextra bug975.c bug975.c:1:1: warning: return type defaults to ‘int’ [-Wimplicit-int] 1 | parse_args(char (**child_args_ptr_ptr)[]) { | ^~~~~~~~~~ bug975.c: In function ‘parse_args’: bug975.c:2:25: warning: implicit declaration of function ‘calloc’ [-Wimplicit-function-declaration] 2 | *child_args_ptr_ptr = calloc(1, sizeof(char)); | ^~~~~~ bug975.c:1:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘calloc’ +++ |+#include <stdlib.h> 1 | parse_args(char (**child_args_ptr_ptr)[]) { bug975.c:2:25: warning: incompatible implicit declaration of built-in function ‘calloc’ [-Wbuiltin-declaration-mismatch] 2 | *child_args_ptr_ptr = calloc(1, sizeof(char)); | ^~~~~~ bug975.c:2:25: note: include ‘<stdlib.h>’ or provide a declaration of ‘calloc’ bug975.c:2:3: internal compiler error: Segmentation fault 2 | *child_args_ptr_ptr = calloc(1, sizeof(char)); | ^ 0xebd319 crash_signal(int) ../../trunk.year/gcc/toplev.cc:315 0x74ffd9 convert_for_assignment(unsigned int, unsigned int, tree_node*, tree_node*, tree_node*, impl_conv, bool, tree_node*, tree_node*, int, int) ../../trunk.year/gcc/c/c-typeck.cc:7370