replacement for “fvtable-gc” in GCC

蹲街弑〆低调 提交于 2019-12-05 18:18:33

Looks like the feature was too buggy, so it has been removed several years ago. I don't think there is an equivalent replacement.

Though I haven't found an official statement, there are several comments that fvtable-gc is broken at least in the GCC 3.x series, maybe earlier. For example (source: cris.h; claiming to be part of GCC):

... When bugs are removed from -fvtable-gc (-fforce-addr causes invalid .vtable_entry asm in tinfo.cc and nothing at all works in GCC 3.0-pre) ...

Today, many years later, the compilers should be far more advanced. Maybe GCC's whole program optimizer is smart enough to detect and eliminate unused virtual functions, but I'm not sure.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!