Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!ucsd!ames!ncar!ico!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: Problems with IBM RS6000 C compiler Message-ID: <17224@haddock.ima.isc.com> Date: 3 Aug 90 18:12:42 GMT References: <476@mtndew.UUCP> Reply-To: karl@kelp.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Cambridge, MA 02138-5302 Lines: 24 In article <476@mtndew.UUCP> friedl@mtndew.UUCP (Stephen J. Friedl) writes: > 1 | #ifdef undef > .......a.... >a - 1506-199: (S) Expecting macro name on #ifdef or #ifndef directive. Looks like a bug; possibly the compiler (mistakenly) believes that `undef' is a reserved word. It isn't (except immediately following `#'), and besides, the preprocessor isn't supposed to forbid redefinition of keywords. >[prototypes in header files don't use `const'] This is a bug. (Easy enough to make, since many of the relevant Standards give specifications in pre-ANSI C, alas.) > extern void foo( void *** ); > any_type **array; > foo(&array); >I just don't get it; the ANSI compiler on the 3B2 doen't complain about this. User bug, and a bug in the 3b2 compiler. The code not only violates the Standard, but it's *wrong*. It will fail to do the right thing on certain architectures, and no amount of casting will make it right. Karl W. Z. Heuer (karl@kelp.ima.isc.com or ima!kelp!karl), The Walking Lint