home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_07_04 / v7n4054a.txt < prev    next >
Text File  |  1989-01-05  |  1KB  |  34 lines

  1. /*
  2.  *  zansi1.c - Things Zortech accepts but shouldn't.
  3.  */
  4.  
  5. #undef  __LINE__        ANSI C does not
  6. #define __FILE__        allow these predefined
  7. #undef  __DATE__        macros to be the subject
  8. #define __TIME__        of a "#define" or
  9. #undef  __STDC__        "#undef" directive.
  10.  
  11. #define x   a + 5
  12. #define x   a - 5   /* not legal to redefine macro */
  13.  
  14. /*
  15.  *  ANSI C requires a comma before an ellipsis.  C++ requires
  16.  *  that there be no comma before the ellipsis.  Zortech allows
  17.  *  the comma to be optional in both languages.
  18.  */
  19. int     printf(char *format ...);   /* comma required before ellipsis   */
  20.  
  21. #include <stdio.h>  grok ! (:-^) /* should not allow garbage */
  22.  
  23.  
  24.     main(int argc, char **argv)
  25. {
  26. long    float   george;         /* 'long float' is not legal in ANSI C  */
  27. auto    int     atoi(char *);   /* 'auto' is not legal for function     */
  28. const   int     fred = 5lulululu;       /* Illegal suffix accepted      */
  29.  
  30. }
  31.  
  32. #if ((int)1.5) > 4      /* neither floats nor casts are legal in #if    */
  33. #endif
  34.