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
Post a Comment