🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #2115

const function bug

#2115
From: tiemann
Date: Tue, 02 Jan 1990 19:49
23 lines
1205 bytes
Your line numbers are guaranteed to be different, but here's the fix:

calvin% diff -c2 cplus-decl.c~ cplus-decl.c
*** cplus-decl.c~	Mon Jan  1 18:35:46 1990
--- cplus-decl.c	Tue Jan  2 14:45:55 1990
***************
*** 1796,1801 ****
  	  /* Install a global value.  */
  
! 	  /* A `const' which was not declared `extern' is invisible.  */
! 	  if (TREE_READONLY (x) && ! DECL_EXTERNAL (x))
  	    TREE_PUBLIC (x) = 0;
  
--- 1796,1803 ----
  	  /* Install a global value.  */
  
! 	  /* Rule for VAR_DECLs, but not for other kinds of _DECLs:
! 	     A `const' which was not declared `extern' is invisible.  */
! 	  if (TREE_CODE (x) == VAR_DECL
! 	      && TREE_READONLY (x) && ! DECL_EXTERNAL (x))
  	    TREE_PUBLIC (x) = 0;
  
calvin% 
Technical Details
Message-ID: <9001021949.AA15870@snoopy.crd.Ge.Com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!snoopy.crd.ge.com!tiemann

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!snoopy.crd.ge.com!tiemann
From: tiemann@snoopy.crd.ge.com
Newsgroups: gnu.g++.bug
Subject: const function bug
Message-ID: <9001021949.AA15870@snoopy.crd.Ge.Com>
Date: 2 Jan 90 19:49:29 GMT
Sender: daemon@tut.cis.ohio-state.edu
Reply-To: tiemann@wheaties.ai.mit.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 23