You could tell gcc that some function never returns. This allows certain optimizations and helps to avoid false warnings of uninitialized variables.
This is done using the noreturn attribute:
void func() __attribute__ ((noreturn));
If the function returns despite the noreturn attribute, the compiler generates a warning that you see (which in your case will noreturn into an error).
Since you are unlikely to use noreturn in your code, the likely explanation is that you have a function whose name comes across the standard noreturn function, as shown in the following example:
#include <stdlib.h> void exit(int) { } // warning: 'noreturn' function does return [enabled by default]
Here my exit collides with exit(3) .
Another obvious candidate for such a collision is abort(3) .
Of course, if your function is really called hello() , the culprit is almost certainly located somewhere inside your code base.
NPE
source share