Reputation: 2346
I can choose to call
gcc --std=c99 toto.c -o toto.elf
But in my case, I would like to know which --std is used by default when calling
gcc toto.c -o toto.elf
Note for closing request: I refute the idea that this topic is a duplicate, in fact, what I want is not only knowing what the default --std is but also what --std is currently used and how make difference between std=gnu11 and std=c11. Sure that my first post was leading people in error.
Upvotes: 1
Views: 159
Reputation: 214860
-std=gnu90
as default.-std=gnu11
as default.-std=gnu17
as default.So you only need to check --version
. However, the __STDC_VERSION__
should also correspond to the -std=cxx
even when compiling with GNU extensions.
Upvotes: 2