home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / lclint.zip / lclint-2_3h-os2-bin.zip / test / argorder2.c < prev    next >
Text File  |  1997-09-03  |  392b  |  21 lines

  1. int i;
  2.  
  3. int h()
  4. {
  5.   return i;
  6. }
  7.  
  8. int f(int x, int y)
  9. {
  10.   i = i + x + y;
  11.   return i;
  12. }
  13.   
  14. int g()
  15. {
  16.   (void) f(f(1, 2), f(1, 2)); /* 1, 2. arg1 modifies i, used by arg2, vice versa */
  17.   (void) f(f(1, 2), h());     /* 3. arg1 modifies i, used by arg2 */
  18.   (void) f(f(1, 2), i);       /* 4. arg1 modifies i, used by arg2 */
  19.   return (f(i++, i));         /* 5. arg1 modifies i, used by arg2 */
  20. }
  21.