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