From 3035182014911478128
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10f5bc,6f6e97a6fdbbf44c
X-Google-Attributes: gid10f5bc,public
X-Google-Thread: 109fba,6f6e97a6fdbbf44c
X-Google-Attributes: gid109fba,public
X-Google-Thread: 102b75,6f6e97a6fdbbf44c
X-Google-Attributes: gid102b75,public
X-Google-Thread: f78e5,6f6e97a6fdbbf44c
X-Google-Attributes: gidf78e5,public
X-Google-Thread: 1014db,6f6e97a6fdbbf44c
X-Google-Attributes: gid1014db,public
X-Google-Thread: 110292,6f6e97a6fdbbf44c
X-Google-Attributes: gid110292,public
X-Google-Thread: 1149ec,6f6e97a6fdbbf44c
X-Google-Attributes: gid1149ec,public
From: rearnsha@armltd.co.uk (Richard Earnshaw)
Subject: Re: And you thought that the Pentium bug was bad! (Get a load of this!)
Date: 1995/07/01
Message-ID: <3t492d$d9h@doc.armltd.co.uk>#1/1
X-Deja-AN: 105418776
distribution: world
sender: rearnsha@doc.armltd.co.uk (Richard Earnshaw)
references: <3s2las$1br@hustle.rahul.net> <xz93fh2oa75.fsf@euler> <DArJHI.1Dz@byron.net4.io.org> <danpop.804335483@rscernix> <3su65u$mnn@sunsystem5.informatik.tu-muenchen.de>
organization: Advanced RISC Machines Ltd
newsgroups: comp.std.c,comp.std.c++,comp.lang.c,comp.lang.c++,comp.sys.intel,comp.arch,comp.software.testing

In article <3su65u$mnn@sunsystem5.informatik.tu-muenchen.de>, paysan@informatik.tu-muenchen.de (Bernd Paysan) writes:
> And as this seems to be an ambiguous condition in the C standard, berhaps
> the GNU C developer decided to change the behavior on every minor release.
> 2.7.0 gives 0.9 again. What will 2.8.x give :-)?
> 
> I've heard that before #pragma was standardized for C++ the cccp did funny
> things each time it encountered a #pragma (it is implementation defined in
> C, and cccp started a game or so - perfectly legal, but relly strange).
> 

That was a long time ago, the code is still there, but is now commented 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
 



