AnsweredAssumed Answered

Which C/C++ dialect is MCUXpresso using by default?

Question asked by danielholala on Feb 16, 2018
Latest reply on Feb 19, 2018 by LPCX presso support

Hi,

I'm using MCUXpresso IDE and SDK shipped with it. The IDE also installs the required toolchains, so I don't have to worry about all the parts and the setup. While this provides a solid base to start working with, it sometimes hides away some interesting details.

For example, the C/C++ dialect used in the current project is set in the project settings (C/C++ Build > Settings > Tool Settings > Dialect) as "Compiler default". Regarding "gcc", the default depends on the compiler version used but I don't know which version of gcc the IDE installed.

 

To find out which compiler is used for the current project, I clicked "Utilities > Open command prompt" in the context menu. Running "gcc --version" reports "6.3.1 20170620". 

 

Google didn't have the manual for exactly this gcc version but for version 6.4.0, the official manual states:

 

The default, if no C language dialect options are given, is -std=gnu11.

and 

The default, if no C++ language dialect options are given, is -std=gnu++14.

Can I correctly assume that these are the C/C++ dialects used for my current project?

 

Thanks.

Outcomes