gcc warning - enforing check about returning a value in gcc -


i compiling c/c++ files using gcc.

i noticed today bug caused app crash. caused fact function didn't return value (see below). know if there flag in gcc enforcing these kind of checking or why compiler not warning me this?

i compiling c files object files basic -g -d_gnu_source -o outobjectfile -c myfile.c option.

   //.c file    int    myfunc(){       ...do       ..without return statement    }     //.h file    extern int myfun(); 

when using gcc, compile with:

-std=c99 -pedantic -wall -wextra -wwrite-strings c

-ansi -pedantic -wall -wextra -weffc++ c++


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -