Re: How to devirtualize one class?

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

 



>> How do I apply -fno-devirtualize to just the class when it needs to be
>> applied to a particular class's header file (and that header file is
>> included elsewhere) ?
>
> I'm not sure this is possible via an option (or #pragma optimize).
> -fdevirtualize applies to the call sites to a virtual functions,
> not to the virtual function definitions.  The only approach that
> comes to mind is to annotate the callers with #pragma GCC optimize
> ("no-devirtualize").  That works in 5.0 and a simple test case but
> doesn't seem to work as I expect in 4.9.

https://gcc.gnu.org/wiki/FAQ#optimize_attribute_broken



[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