home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: sparky!uunet!newsflash.concordia.ca!mizar.cc.umanitoba.ca!umfehr06
- From: umfehr06@ccu.umanitoba.ca (John Fehr)
- Subject: Re: wierd sas/c bug
- Message-ID: <BzMGn8.370@ccu.umanitoba.ca>
- Sender: news@ccu.umanitoba.ca
- Nntp-Posting-Host: ccu.umanitoba.ca
- Organization: University of Manitoba, Winnipeg, Canada
- References: <BzIw0y.n31@ccu.umanitoba.ca> <BzM6F7.E6K@unx.sas.com>
- Date: Mon, 21 Dec 1992 18:28:19 GMT
- Lines: 29
-
- In <BzM6F7.E6K@unx.sas.com> walker@twix.unx.sas.com (Doug Walker) writes:
- >Please post a COMPILABLE example. I can virtually guarantee that this
- >is not a compiler bug. A compiler that broken would not compile
-
- OK... here's a compilable example: (hopefully I'll type it in right this
- time. :)
-
- #include <stdio.h>
- #undef WHATEVER "test"
-
- char dummy[100]="another test";
-
- main() {
- printf("dummy='%s'\n",dummy);
- }
-
- That SHOULD (it does for me) print out something totally unexpected.
- What's almost as wierd, is if you #include something after the
- #undef. (an empy .h file will do)
- 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.
- John
-
- --
- -----------------------------------------------------
- - John Fehr - DoD#505 -
- - umfehr06@ccu.umanitoba.ca - GPz550 -
- - umfehr06@silver.cs.umanitoba.ca - A3000 kicks! -
-