🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #2303

gcc-cpp from SUNPRO make discards output (gcc1.33).

#2303
From: Paul Hudson
Date: Tue, 14 Feb 1989 10:16
37 lines
1771 bytes
Although the new gcc-ccp works with the SUNPRO make in the sense of
writing the dependencies to a file, it appears it neglects to write
the pre-processed output!

The reason is that "printdeps" is used as a flag for this and for -M.
Although there is another flag inhibit_output, it isn't even examined if
printdeps is non-zero - see the code fragment from cccp.c included here.


  if (dump_macros)
    dump_all_macros ();
  else if (print_deps) {
    fputs (deps_buffer, deps_stream);
    putc ('\n', deps_stream);
    if (deps_stream != stdout) {
      fclose (deps_stream);
      if (ferror (deps_stream))
	fatal ("I/O error on output");
    }
  } else if (! inhibit_output) {
    if (write (fileno (stdout), outbuf.buf, outbuf.bufp - outbuf.buf) < 0)
      fatal ("I/O error on output");
  }

This was a very confusing bug - the identical command line executed outside
of make worked, of course, because the appropiate enviroment variables
weren't set. Just shows what a bad design decision sun made when adding
this feature.

Paul Hudson 

Snail mail: Monotype ADG	Email:	...!ukc!acorn!moncam!paul
	    Science Park,		paul@moncam.co.uk
	    Milton Road,	"Sun Microsysytems:
	    Cambridge,		 The Company is Arrogant (TM)"
	    CB4 4FQ
Technical Details
Message-ID: <8902141016.AA20966@marvin.moncam.uucp>
Path: arc1-ca.pugleaf.net!utzoo!yunexus!telly!attcan!dptcdc!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!UUNET.UU.NET!mcvax!moncam!paul

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!yunexus!telly!attcan!dptcdc!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!UUNET.UU.NET!mcvax!moncam!paul
From: mcvax!moncam!paul@UUNET.UU.NET (Paul Hudson)
Newsgroups: gnu.gcc.bug
Subject: gcc-cpp from SUNPRO make discards output (gcc1.33).
Message-ID: <8902141016.AA20966@marvin.moncam.uucp>
Date: 14 Feb 89 10:16:20 GMT
Article-I.D.: marvin.8902141016.AA20966
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 37