public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/5144: ICE on const_hash
@ 2002-04-26  5:02 nathan
  0 siblings, 0 replies; 2+ messages in thread
From: nathan @ 2002-04-26  5:02 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, gcurran, nobody

Synopsis: ICE on const_hash

State-Changed-From-To: open->closed
State-Changed-By: nathan
State-Changed-When: Fri Apr 26 05:02:12 2002
State-Changed-Why:
    fixed on 3.0

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5144


^ permalink raw reply	[flat|nested] 2+ messages in thread

* c++/5144: ICE on const_hash
@ 2001-12-17 17:06 gcurran
  0 siblings, 0 replies; 2+ messages in thread
From: gcurran @ 2001-12-17 17:06 UTC (permalink / raw)
  To: gcc-gnats


>Number:         5144
>Category:       c++
>Synopsis:       ICE on const_hash
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 17 17:06:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     George Curran
>Release:        gcc version 2.95.2 19991024 (release)
>Organization:
>Environment:
Suse Linux ver 7.1
pentium 300Mhz, 96M ram
>Description:
viffer@linux:~/cpp.21days > c++ lst14.11.cpp -o example
lst14.11.cpp: In function `int main(...)':
lst14.11.cpp:30: Internal compiler error in `const_hash', at varasm.c:2372
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.  

attempting to compile program 14.11 in "Teach Yourself C++ Programming in 21 Days" by
Jesse Liberty.  Sams Publishing
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="lst14.11.cpp"
Content-Disposition: inline; filename="lst14.11.cpp"

// listing 14.11 array of pointers to member functions

#include<iostream.h>

enum BOOL {FALSE, TRUE};

class Dog
{
	public:
		void Speak() const {cout << "Woof!\n";}
		void Move() const {cout << "Walking to heel. . .\n";}
		void Eat() const {cout << "Gobbling food. . .\n";}
		void Growl() const {cout << "Grrrr!\n";}
		void Whimper() const {cout << "Whining noises. . .\n";}
		void RollOver() const {cout << "Rolling over. . .\n";}
		void PlayDead() const {cout << "Is this the end of Little Caeser?\n";}
};

typedef void (Dog::*PDF)()const ;
void main()
{
	const int MaxFuncs = 7;
	PDF DogFunctions[MaxFuncs] = 
		{	&Dog::Speak,
			&Dog::Move,
			&Dog::Eat,
			&Dog::Growl,
			&Dog::Whimper,
			&Dog::RollOver,
			&Dog::PlayDead};
			
	Dog* pDog =0;
	int Method;
	BOOL fQuit = FALSE;
	
	while (!fQuit)
	{
		cout << "(0)Quit (1)Speak (2)Move (3)Eat (4)Growl";
		cout << "(5)Whimper (6)Roll Over (7)Play Dead: ";
		cin >> Method
		if (Method == 0)
		{
			fQuit = TRUE;
			break;
		}
		else
		{
			pDog = new Dog;
			(pDog->*DogFunctions[Method-1])();
			delete pDog;
		}
	}
}


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-04-26 12:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-26  5:02 c++/5144: ICE on const_hash nathan
  -- strict thread matches above, loose matches on Subject: below --
2001-12-17 17:06 gcurran

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).