V2502. MISRA. The 'goto' statement should not be used.

This diagnostic rule is based on the software development guidelines developed by MISRA (Motor Industry Software Reliability Association).

This diagnostic rule is relevant only to C-programs.

The use of 'goto' statements could mar the program structure and obscure the code. This diagnostic detects code fragments that use 'goto' statements.

Here is an example of code triggering this warning:

int foo(int value)
  if (value==0)
    goto bad_arg;
  return OK;
  return BAD_ARG;

This diagnostic is classified as:

  • MISRA-C-15.1

Bugs Found

Checked Projects
Collected Errors
14 526
This website uses cookies and other technology to provide you a more personalized experience. By continuing the view of our web-pages you accept the terms of using these files. If you don't want your personal data to be processed, please, leave this site. Learn More →