home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume15 / hash8 / ltest.c < prev    next >
C/C++ Source or Header  |  1988-06-05  |  1KB  |  50 lines

  1. #include <stdio.h>
  2.  
  3. /*
  4.  * Test the lcc script
  5.  */
  6.  
  7. int VeryLongIdentifierNumber1 = 1;
  8. int VeryLongIdentifierNumber2 = 2;
  9.  
  10. void VeryLongIdentifierNumber3 ();
  11. /*
  12.  * The following should generate a lint complaint, because it actually
  13.  * returns an int.
  14.  */
  15. extern void VeryLongIdentifierNumber4 ();
  16.  
  17. /*
  18.  * The following will generate a loader error.  On some loaders, this is
  19.  * ok;  on others it will keep you from getting an output file.  If so,
  20.  * you will need to remove the reference below.
  21.  */
  22. extern int VeryLongIdentifierNumber5 ();
  23.  
  24. int main (argc, argv)
  25.     register int        argc;        /* Argument count */
  26.     register char *        argv[];        /* Argument vector */
  27.     {
  28.  
  29.     /*
  30.      * Generate a C compiler warning message.  Argv is char **, not char *.
  31.      */
  32.     argv = (char *) argc;
  33.     VeryLongIdentifierNumber3 ();
  34.     /*
  35.      * The following is in a second file
  36.      */
  37.     VeryLongIdentifierNumber4 ();
  38.     return 0;
  39.     }
  40.  
  41. void VeryLongIdentifierNumber3 ()
  42.     {
  43.     int i = 0;
  44.  
  45.     printf ("should print 1 2:  %d %d\n", VeryLongIdentifierNumber1,
  46.       VeryLongIdentifierNumber2);
  47.     if (i)                /* Never executed - undefined ref */
  48.     VeryLongIdentifierNumber5 ();
  49.     }
  50.