Is there a gcc option to assume all extern “C” functions cannot propagate exceptions?

前端 未结 4 1424
别那么骄傲
别那么骄傲 2021-02-01 16:35

Is there any way, short of putting an attribute on each function prototype, to let gcc know that C functions can never propagate exceptions, i.e. that all functions declared ins

4条回答
  •  北海茫月
    2021-02-01 17:14

    GCC 4.5 seems to optimize those out for me automatically. Indeed, this line appears in the list of changes at http://gcc.gnu.org/gcc-4.5/changes.html :

    • GCC now optimize exception handling code. In particular cleanup regions that are proved to not have any effect are optimized out.

提交回复
热议问题