Path: 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 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%