cancel
Showing results for 
Search instead for 
Did you mean: 

Changing default parameters of main()

PMath.4
Senior III

I've got an application where the main() function needs to be non-standard. In older version of GCC this wasn't an issue but the newer versions seem to have changed something

I need:

void main(long long int *c, long long int *b)

but GCC is overriding this. Is there a compiler switch to let me do what has worked fine previously?

Thanks

2 REPLIES 2
TDK
Guru

How are you passing parameters to main() in an STM32 application?

There are only two allowed forms for arguments of main() per the C standard:

int main (void);
int main (int argc, char* argv[]);

If you feel a post has answered your question, please click "Accept as Solution".
berendi
Principal

> GCC is overriding this

What do you mean by that? Does gcc rewrite the code or what?