home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / amiga / programm / 17719 < prev    next >
Encoding:
Text File  |  1992-12-22  |  2.2 KB  |  50 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: sparky!uunet!math.fu-berlin.de!informatik.tu-muenchen.de!rz.uni-passau.de!kirk.fmi.uni-passau.de!agsteine
  3. From: agsteine@kirk.fmi.uni-passau.de (Karlheinz Agsteiner)
  4. Subject: Re: wierd sas/c bug
  5. Message-ID: <1992Dec22.201519.26495@tom.rz.uni-passau.de>
  6. Sender: news@tom.rz.uni-passau.de (News-Operator)
  7. Organization: University of Passau, Germany
  8. References: <BzIw0y.n31@ccu.umanitoba.ca> <BzM6F7.E6K@unx.sas.com> <BzMGn8.370@ccu.umanitoba.ca> <Bznxuv.InB@unx.sas.com>
  9. Date: Tue, 22 Dec 1992 20:15:19 GMT
  10. Lines: 38
  11.  
  12. In article <Bznxuv.InB@unx.sas.com>, walker@twix.unx.sas.com (Doug Walker) writes:
  13. |> 
  14. |> In article <BzMGn8.370@ccu.umanitoba.ca>, umfehr06@ccu.umanitoba.ca (John Fehr) writes:
  15. |> |> I know that #undef WHATEVER "test" isn't ANSI-compliant (the HP-compiler
  16. |> |> complanes about it anyway) but some programs actually have that in
  17. |> |> their code.
  18. |> 
  19. |> What the heck does it mean?  This doesn't mean anything in K&R dialects
  20. |> either, as far as I know.
  21. |> 
  22. |> |> -  John Fehr                        -    DoD#505    -
  23. |> 
  24. |> -- 
  25. |>   *****
  26. |> =*|_o_o|\\=====Doug Walker, Software Distiller====== BBS: (919)460-7430 =
  27. |>  *|. o.| ||                                          1200/2400/9600 Dual
  28. |>   | o  |//     For all you do, this bug's for you!
  29. |>   ====== 
  30. |> usenet: walker@unx.sas.com                            bix: djwalker 
  31. |> Any opinions expressed are mine, not those of SAS Institute, Inc.
  32. |> 
  33. This seems to be some kind of "lazy programmer code". I think that someone
  34. was testing his program, and wanted to temporally undo a #define he did.
  35. Of course it is easier to write #undef WHATEVER "test" instead of writing
  36. #undef WHATEVER  /* should be "test" */             or something like that.
  37. For the redo of the #define he only has to replace #undef by #define. 
  38.  
  39. Strangely enough, most UNIX C compilers happily accept the above code.
  40.  
  41. At university of passau, our Apollo Workstations compile the code with both 
  42. UNIX CC and GCC 2.1 without warnings, and the program does what it should.
  43. Even the old pre-ANSI CC at our SUN/4 accepts an #undef with 2 arguments.
  44. Maybe this is some kind of "undocumented feature" of C :-)
  45.  
  46. Karlheinz Agsteiner
  47.  
  48. --
  49. e-mail: agsteine@kirk.fmi.uni-passau.de
  50.