arm-rtems5-g++ -std=c++11 and -std=c++0x support

Misra, Avinash Avinash.Misra at jhuapl.edu
Sat Jan 5 18:02:50 UTC 2019


Using this answer from Stack Overflow:  https://stackoverflow.com/questions/46980383/how-to-determine-what-c-standard-is-the-default-for-a-c-compiler

I was able to determine the default std the arm-rtems5-g++ cross compiler (based off of GCC 7.3) is using GNU++14  (C++14) by printing out the __cplusplus macro to the console. This matches what the GCC website says the cross compiler should be using.

Thanks,
Avi

From: Mikhail Svetkin <mikhail.svetkin at gmail.com>
Sent: Friday, January 4, 2019 4:38 PM
To: Misra, Avinash <Avinash.Misra at jhuapl.edu>
Subject: Re: arm-rtems5-g++ -std=c++11 and -std=c++0x support

Yes, sure.

You can try to compile a simple application with c++11 features.

For example just add #include <thread>.


On 4 Jan 2019, at 22:35, Misra, Avinash <Avinash.Misra at jhuapl.edu<mailto:Avinash.Misra at jhuapl.edu>> wrote:

That would be awesome if you could. Is there a way I can check?

Thanks,
Avi

From: Mikhail Svetkin <mikhail.svetkin at gmail.com<mailto:mikhail.svetkin at gmail.com>>
Sent: Friday, January 4, 2019 4:29 PM
To: Misra, Avinash <Avinash.Misra at jhuapl.edu<mailto:Avinash.Misra at jhuapl.edu>>
Subject: Re: arm-rtems5-g++ -std=c++11 and -std=c++0x support

I think it should be gnu++11 by default, but I am not sure.
I can check it only on Monday



On 4 Jan 2019, at 22:14, Misra, Avinash <Avinash.Misra at jhuapl.edu<mailto:Avinash.Misra at jhuapl.edu>> wrote:

Gotcha, I hadn’t realized that limitation existed. Do you know what it uses by default if –std isn’t specified?

Thanks,
Avi
From: Mikhail Svetkin <mikhail.svetkin at gmail.com<mailto:mikhail.svetkin at gmail.com>>
Sent: Friday, January 4, 2019 4:12 PM
To: Misra, Avinash <Avinash.Misra at jhuapl.edu<mailto:Avinash.Misra at jhuapl.edu>>
Cc: rtems-devel at rtems.org<mailto:rtems-devel at rtems.org> <devel at rtems.org<mailto:devel at rtems.org>>
Subject: Re: arm-rtems5-g++ -std=c++11 and -std=c++0x support

Hi,

RTEMS supports only GNU extensions.

You can use -std=gnu++11




On 4 Jan 2019, at 22:09, Misra, Avinash <Avinash.Misra at jhuapl.edu<mailto:Avinash.Misra at jhuapl.edu>> wrote:

Hi,

Does the RTEMS 5 ARM G++ Cross Compiler support the –std flag? I’ve tried using –std=c++0x and –std=c++11 and both times I have gotten errors with type definitions in the standard includes. If the arm-rtems5-g++ cross compiler doesn’t support specifying which c++ standard to use then which standard is it using?

Thanks,

Avi

_______________________________________________
devel mailing list
devel at rtems.org<mailto:devel at rtems.org>
http://lists.rtems.org/mailman/listinfo/devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20190105/0ac290c0/attachment-0002.html>


More information about the devel mailing list