Re: detect empty functions

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

 



On 02/05/2014 03:30 PM, Prathamesh Kulkarni wrote:
I wanted to ask, is there a way to detect if a function has empty body
using GCC API ?

Yes, you can write a plug-in and iterate over all the basic blocks in a function and check if they are empty.

A function-like entity which contains no statements might still emit code, so you need to figure what you need exactly.

--
Florian Weimer / Red Hat Product Security Team




[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