🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #1807

Bug in v1.30 gcc-cpp output to stdout (+FIX)

#1807
From: "Charles R. LaBrec"
Date: Sun, 16 Oct 1988 17:50
26 lines
1322 bytes
There is a bug in v1.30 gcc-cpp that prevents output to stdout when an
output file is never specified.  The variable out_fname is NULL in
this case, but the conditional is incorrect.  A diff follows.

Charles LaBrec
crl@physics.purdue.edu

*** cccp.c-dist	Sun Oct 16 02:16:45 1988
--- cccp.c	Sun Oct 16 12:34:24 1988
***************
*** 967,973 ****
  
    /* Now that we know the input file is valid, open the output.  */
  
!   if (out_fname && !strcmp (out_fname, ""))
      out_fname = "stdout";
    else if (! freopen (out_fname, "w", stdout))
      pfatal_with_name (out_fname);
--- 967,973 ----
  
    /* Now that we know the input file is valid, open the output.  */
  
!   if (out_fname == NULL || !strcmp (out_fname, ""))
      out_fname = "stdout";
    else if (! freopen (out_fname, "w", stdout))
      pfatal_with_name (out_fname);
Technical Details
Message-ID: <CMM.0.88.593027400.crl@gibbs.physics.purdue.edu>
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!lll-winken!killer!mit-eddie!bloom-beacon!tut.cis.ohio-state.edu!GIBBS.PHYSICS.PURDUE.EDU!crl

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!lll-winken!killer!mit-eddie!bloom-beacon!tut.cis.ohio-state.edu!GIBBS.PHYSICS.PURDUE.EDU!crl
From: crl@GIBBS.PHYSICS.PURDUE.EDU ("Charles R. LaBrec")
Newsgroups: gnu.gcc.bug
Subject: Bug in v1.30 gcc-cpp output to stdout (+FIX)
Message-ID: <CMM.0.88.593027400.crl@gibbs.physics.purdue.edu>
Date: 16 Oct 88 17:50:00 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 25