This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Selectiv on/off-turning of warnings
- To: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Subject: Re: Selectiv on/off-turning of warnings
- From: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Date: Thu, 23 Mar 2000 13:04:56 +0000 (GMT)
- CC: Enrico dot Scholz at informatik dot tu-chemnitz dot de, gcc at gcc dot gnu dot org
> I think there would be a long debate whether it is reasonable. For one
> thing, some people claim that #pragma is not reasonable. Since the
> standard says a compiler can do anything it wants when it sees a
> #pragma, I believe some version of gcc used to invoke Emacs when it
> saw a #pragma :-)
The code is still in cccp.c, although it is #ifdefed out these days:
#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