Since default parameters aren't standard C, I'm unsure if this is a bug or intended.
It'd be really nice if it worked, so we can pass default arrays into functions.
void function( int* param = ( int[] ){ 1, 2, 3 } ){ //This doesn't work
int* local = ( int[] ){ 1, 2, 3 }; //This works
}
Reading this might help
https://web.cs.dal.ca/~vlado/pl/C_Standard_2011-n1570.pdf (https://web.cs.dal.ca/~vlado/pl/C_Standard_2011-n1570.pdf)
https://www.iso-9899.info/wiki/The_Standard (https://www.iso-9899.info/wiki/The_Standard)
Quote from: TimoVJL on April 07, 2025, 04:43:38 PMReading this might help
No, nothing to do with the /Zx compiler switch.
>gcc -c test_Zx.c
test_Zx.c:1:27: error: expected ';', ',' or ')' before '=' token
1 | ´╗┐void function( int* param = ( int[] ){ 1, 2, 3 } ){ //This doesn't work