﻿# V2502\. MISRA\. The 'goto' statement should not be used\.

This diagnostic rule is based on the software development guidelines developed by [MISRA](https://www.misra.org.uk/) \(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: 

```cpp
int foo(int value)
{
  ....
  if (value==0)
    goto bad_arg;
  ....
  return OK;
bad_arg:
  return BAD_ARG;
}
```