Re: 'C' Operators precedence

Michael Meissner (meissner@cygnus.com)
Wed, 20 May 1998 15:09:49 -0400


| There is an unconfirmed story that a certain version of gcc, if you
| invoked some particular kind of undefined behaviour that RMS didn't
| approve of (#pragma, I believe), gcc would look for and exec a copy of
| nethack.

Old GCC's used to invoke hack (not nethack, as nethack hadn't been created at
that point of time). The code is still in cccp.c, only #if 0'ed out:

#if 0
/* This was a fun hack, but #pragma seems to start to be useful.
By failing to recognize it, we pass it through unchanged to cc1. */

/* The behavior of the #pragma directive is implementation defined.
this implementation defines it as follows. */

static int
do_pragma ()
{
close (0);
if (open ("/dev/tty", O_RDONLY, 0666) != 0)
goto nope;
close (1);
if (open ("/dev/tty", O_WRONLY, 0666) != 1)
goto nope;
execl ("/usr/games/hack", "#pragma", 0);
execl ("/usr/games/rogue", "#pragma", 0);
execl ("/usr/new/emacs", "-f", "hanoi", "9", "-kill", 0);
execl ("/usr/local/emacs", "-f", "hanoi", "9", "-kill", 0);
nope:
fatal ("You are in a maze of twisty compiler features, all different");
}
#endif

--
Michael Meissner, Cygnus Solutions (Massachusetts office)
4th floor, 955 Massachusetts Avenue, Cambridge, MA 02139, USA
meissner@cygnus.com,	617-354-5416 (office),	617-354-7161 (fax)

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu