Re: How to positively detect if rtti is enabled or not

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 20 Jun 2019 at 15:26, ba58smith <ba58smith@xxxxxxxxx> wrote:
>
> #if __GXX_RTTI
> Serial.println("GXX test: RTTI enabled");
> #else
> Serial.println("GXX test: RTTI not enabled");
> #endif
>
> tells me if RTTI is enabled or not.
>
> However:
>
> #if __cpp_rtti
> Serial.println("cpp test: RTTI enabled");
> #else
> Serial.println("cpp test: RTTI not enabled");
> #endif
>
> always tells me that RTTI is not enabled. I don't know if that's what you
> expected I would find or not, but I don't suppose it matters - I got what I
> need.

That means you are using GCC 4.x, which is too old to define the
__cpp_rtti macro. You'll have to stick with __GXX_RTTI.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux