[previous] 2883 [next] This 'goto' statement will always bypass the initialization of local variables.
Control flow

This goto statement will bypass the initialization of one or more local variables. Any attempt to use the value of one of these variables will result in undefined behavior.


/*PRQA S 1313,2001,2015,2017,2200,2201,3201,3205,3220,3311,3408 ++*/
void foo(int n)
{
   goto LAB;                        /* 2883 */

   {
       int c = 0;

LAB:   ++n;                         /*      */
   }
}

QA·C Source Code Analyser 8.1.2
© 2013 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index Contents