Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
bgColor#FFCCCC
langc
 {
  int * restrict p1;
  int * restrict q1;

  int * restrict p2 = p1; /* valid definedundefined behavior  */ 
  int * restrict q2 = q1; /* valid definedundefined behavior  */ 
 }

 

Compliant Solution 

The same results can be achieved as shown in this compliant solution.

Code Block
bgColor#ccccff
langc
 {
  int * restrict p1;   
  int * restrict q1;
  {  /* added inner block begin */
    int * restrict p2 = p1;  /* valid undefineddefined behavior  */    
    int * restrict q2 = q1;  /* valid undefineddefined behavior  */  
    ...
  } /* added inner block end */
}

...