Hi Experts,
I am currently using mix of code between C++ and C codes.
Which version of arm none-eabi GCC supports both C and C++ mix code usage in much efficient way ?
I am using C++ in --std=c++11 and C in --std=c99 options,
Which C++ compiler toolchain binary will be apt. Is it arm-none-eabi-g++ (or) cpp (or) c++ ?
Is it good to use same compiler (G++) for compiling both C and C++ or any better way suggested.
It's better to ask GCC questions in gcc forum.
This forum focuses on Arm products such as Arm Compilers.
Zhifei,
I have to correct you the usage of this forum. This forum, named as GNU Toolchain forum is not focusing on Arm Compilers. It is clearly stated at the front page as
"The GNU Arm Embedded toolchains are integrated and validated packages featuring the Arm Embedded GCC compiler, libraries and other GNU tools necessary for bare-metal software development on devices based on the Arm Cortex-M and Cortex-R processors. "
You are partially right that GCC questions can go to GCC community, but only when the questions are surely about upstream GNU tools themselves. For questions specific to GCC releases from Arm, this is still the right place to discuss. For example if the question is about GCC implementation of the latest C++ spec and a bug report generically to all target architectures, gcc-help@gcc.gnu.org is the right place.
For the question like what asked in this thread, an email to gcc-help@gcc.gnu.org should get an answer. It can be asked in a generic way without mentioning arm-none-eabi.
A quick answer: for C use gcc; for C++ use g++. They always mix well no matter which recent gcc version (4.0+) is used.
Hi Yang,
Sure !! But my intention is to compile the code for target ARM processors (Cortex R series).
I posted here, since I downloaded the toolchain from ARM website.
I have to correct you that this forum IS for GNU toolchain from Arm, as stated in the cover page. But I do agree with you that the question asked in this thread should be asked in gcc community forum, via a mail list called gcc-help.
This forum focus on questions specific to Arm release of GNU toolchain, which is based on open source GCC and others. When the questions are able generic GCC usage, like language features, usually gcc-help come give you a quicker answer.
Very quickly here is my answer: gcc for C, g++ for C++. They can always be mixed in linking stage effectively.