Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: more minor changes

...

This error is frequently diagnosed by compilers (see MSC00-C. Compile cleanly at high warning levels).

Implementation Details

This error can often be detected through the analysis of compiler warnings. For example, when this code When this noncompliant code example is compiled with /-Wall on most versions of the GCC compiler,

Code Block
bgColor#ccccff
#include <stdio.h>

int main(void) {
  printf("test\n");
}

the following warning will be is generated

Code Block
bgColor#ccccff
example.c: In function ‘main’:
example.c:5: warning: control reaches end of non-void function

...