We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I have a project with mixed C and C++ source files (more specifically, FreeRTOS). If I use C++03, Keil correctly determines the language based on extension (.cpp or .c) and everything is fine.
I want to use C++11 and set --cpp11 option in the Misc. controls block. Now Keil will compile all files as C++ source files and that means that some .c files won't compile - some C99 features won't work, such as designated initializers, and in some places C++ is more restrictive about implicit type conversions.
So my question is: is there a way to turn on C++11 only for .cpp files without changing compilation options for every such file separately?
I discovered the reverse way to do it - I can put --c99 option in Misc. controls for specific group in the project - and it will compile as C99. That seems really strange because --c99 option is already set at the project level.