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 / commentcmd.c < prev    next >
Text File  |  1997-09-03  |  2KB  |  52 lines

  1. typedef int abst1, abst2; /* 1, 2. Mutable abstract type abst1 declared without pointer ... */
  2. typedef int abst3; /* 3. Mutable abstract type abst3 declared without pointer ... */
  3.  
  4. int main (void)
  5. {
  6.   int i = 1;
  7.   abst1 a1; abst2 a2; abst3 a3;
  8.  
  9.    /*@access abst1,abst3*/
  10. /* 10 */ a1 = (abst1)i; /* ok */
  11.          a2 = (abst2)i; /* 4. Cast to abstract type abst2: (abst2)i */
  12.          a3 = (abst3)i; /* ok */
  13.  
  14.    /*@noaccess abst1,abst3*/
  15.  
  16. /* 16 */ a1 = (abst1)i; /* 5. Cast to abstract type abst1: (abst1)i */
  17.          a2 = (abst2)i; /* 6. Cast to abstract type abst2: (abst2)i */
  18.          a3 = (abst3)i; /* 7. Cast to abstract type abst3: (abst3)i */
  19.  
  20.    /*@access abst2*/
  21.  
  22. /* 22 */ a1 = (abst1)i; /* 8. Cast to abstract type abst1: (abst1)i */
  23.          a2 = (abst2)i; /* ok */
  24.          a3 = (abst3)i; /* 9. Cast to abstract type abst3: (abst3)i */
  25.  
  26.    /*@access abst1,abst3*/
  27.  
  28. /* 28 */ a1 = (abst1)i; /* ok */
  29.          a2 = (abst2)i; /* ok */ 
  30.          a3 = (abst3)i; /* ok */
  31.  
  32.    /*@noaccess abst1*/
  33.  
  34. /* 34 */ a1 = (abst1)i; /* 10. Cast to abstract type abst1: (abst1)i */
  35.          a2 = (abst2)i; /* ok */
  36.          a3 = (abst3)i; /* ok */
  37.  
  38.    /*@noaccess abst2*/
  39.  
  40. /* 40 */ a1 = (abst1)i; /* 11. Cast to abstract type abst1: (abst1)i */
  41.          a2 = (abst2)i; /* 12. Cast to abstract type abst2: (abst2)i */
  42.          a3 = (abst3)i; /* ok */
  43.  
  44.    /*@noaccess abst3*/
  45.  
  46. /* 46 */ a1 = (abst1)i; /* 13. Cast to abstract type abst1: (abst1)i */
  47.          a2 = (abst2)i; /* 14. Cast to abstract type abst2: (abst2)i */
  48.          a3 = (abst3)i; /* 15. Cast to abstract type abst3: (abst3)i */
  49.  
  50.   return 3;
  51. }
  52.