You could try gcc-10's -fanalyzer option, see https://developers.redhat.com/blog/2020/03/26/static-analysis-in-gcc-10/ https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html But it's immature, and not enabled by default in the gcc-10 in Ubuntu. Have you tried dynamic code analysis? That's more mature, and better supported by gcc at the moment. - Dan On Wed, May 13, 2020 at 9:32 AM Kunal Chauhan via Gcc-help <gcc-help@xxxxxxxxxxx> wrote: > > Hi team > > I want my source file of c to be checked for code violations and null check > etc. > > As from logs crash is coming. > > > Thanks >