gcc 9.1.0
$ cc -std=c11 -w -o vc v.c
$ ./vc -o v .
Segmentation fault
$ cc -std=gnu11 -w -o vc v.c
$ ./vc -o v .
~/code directory has to be used (it's a temporary limitation)
I do it in ~/code/v/compiler directory. I mean for Linux gcc it should be -std=gnu11
I can confirm this: segfault with -std=c11, compiles ok with -std=gnu11 on Ubuntu 19
Solved it: #507
Compiling now uses --std=gnu11: https://github.com/vlang/v/commit/baa4f9d0c9253463ccd29c6ac614a8d49565c01d
Most helpful comment
I do it in
~/code/v/compilerdirectory. I mean for Linux gcc it should be-std=gnu11