Article View: gnu.g++.bug
Article #221Problem handling enum values in g++ 2.2.2 of 21 July 1991.
From: Jeff Greif
Date: Thu, 30 Jul 1992 14:07
Date: Thu, 30 Jul 1992 14:07
79 lines
3819 bytes
3819 bytes
This is on a DG-Aviion, DGUX 5.4.1. The errors all occur on lines
where the elements of the enum element_state are mentioned.
This file compiled in the previous version of g++ 2.2.2 on the DG and the Sun4
SunOS 4.1.1.
hobbes[73]% g++ -v -g -D_M88KBCS_TARGET -I. -W -Wreturn-type -Wcomment -c g++bug.cxx
Reading specs from /usr/local/lib/gcc-lib/m88k-dgux/2.2.2/specs
gcc version 2.2.2
/usr/local/lib/gcc-lib/m88k-dgux/2.2.2/cpp -lang-c++ -v -D_M88KBCS_TARGET -I. -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dm88000 -Dm88k -Dunix -DDGUX -D__CLASSIFY_TYPE__=2 -D__svr4__ -D__m88000__ -D__m88k__ -D__unix__ -D__DGUX__ -D__CLASSIFY_TYPE__=2 -D__svr4__ -D__m88000 -D__m88k -D__unix -D__DGUX -D__CLASSIFY_TYPE__=2 -D__svr4__ -Asystem(unix) -Acpu(m88k) -Amachine(m88k) -g -W -Wreturn-type -Wcomment -D__OPEN_NAMESPACE__ g++bug.cxx /usr/tmp/cca15804.i
GNU CPP version 2.2.2 (88open OCS/BCS, 21 Jul 1992)
/usr/local/lib/gcc-lib/m88k-dgux/2.2.2/cc1plus /usr/tmp/cca15804.i -quiet -dumpbase g++bug.cc -g -W -Wreturn-type -Wcomment -version -o /usr/tmp/cca15804.s
GNU C++ version 2.2.2 (88open OCS/BCS, 21 Jul 1992) compiled by GNU C version 2.2.2.
g++bug.cxx: In method `void notification_element::init (void *)':
g++bug.cxx:26: parse error before `;'
g++bug.cxx: In method `int notification_element::mark_deleted ()':
g++bug.cxx:31: parse error before `)'
g++bug.cxx:32: parse error before `;'
g++bug.cxx: In method `int notification_element::mark_suspended ()':
g++bug.cxx:35: parse error before `)'
g++bug.cxx:36: parse error before `)'
g++bug.cxx: In method `int notification_element::protect ()':
g++bug.cxx:39: parse error before `)'
g++bug.cxx:40: parse error before `;'
g++bug.cxx: In method `void notification_element::unprotect ()':
g++bug.cxx:42: parse error before `;'
---------------------------- g++bug.cxx -----------------------------
#define USING_NOTIFY 1
typedef class notification_table *art_notification_table;
#define NULL 0
#define FALSE 0
#define TRUE 1
typedef int boolean;
typedef void *art_object;
typedef void *art_iterator;
typedef void *art_symbol;
extern art_object a_nil;
class art_base {
protected:
};
enum element_state { CLEAN, PROTECTED, DELETE, SUSPEND};
class notification_element:public art_base {
protected:
art_object key;
notification_element *next;
enum element_state state;
void init(art_object object)
{ key = object; next = NULL; state = CLEAN; }
virtual ~notification_element() {}
virtual void call(art_object object) {}
virtual boolean match(void *, void *, void *) { return(FALSE); }
boolean mark_deleted()
{ if (state == CLEAN) return(FALSE);
state = DELETE;
return(TRUE); }
boolean mark_suspended()
{ if (state == CLEAN) return(FALSE);
if (state == PROTECTED) state = SUSPEND;
return(TRUE); }
boolean protect()
{ if (state != CLEAN) return(FALSE);
state = PROTECTED;
return(TRUE); }
void unprotect() { state = CLEAN; }
friend art_object a_next_notification(art_iterator state, art_symbol type, void *base,
void (*fun)(void *, art_object, void *),
void *arg);
friend void a_restore_notifications(art_symbol type, void *target);
friend void a_suspend_notifications(art_symbol type, void *target);
public:
friend class notification_table;
};
Technical Details
Message-ID:
<9207301407.AA24421@quaestor>Path:
arc1-ca.pugleaf.net!sparky!uunet!usc!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!inference.COM!jmgShow Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug Path: arc1-ca.pugleaf.net!sparky!uunet!usc!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!inference.COM!jmg From: jmg@inference.COM (Jeff Greif) Subject: Problem handling enum values in g++ 2.2.2 of 21 July 1991. Message-ID: <9207301407.AA24421@quaestor> Sender: gnulists@ai.mit.edu Organization: Inference Corporation Distribution: gnu Date: Thu, 30 Jul 1992 14:07:24 GMT Approved: bug-g++@prep.ai.mit.edu Lines: 82