This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/1791: wtf is synopsis?
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c++/1791: wtf is synopsis?
- From: batelcruiser at yahoo dot com
- Date: 27 Jan 2001 00:37:18 -0000
- Reply-To: batelcruiser at yahoo dot com
>Number: 1791
>Category: c++
>Synopsis: wtf is synopsis?
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jan 26 16:46:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: yours truly (Alex)
>Release: gcc --version = 2.96
>Organization:
>Environment:
RedHat 7.0, PII-400Mhz, 128MB, bash, non-root user
>Description:
In a header file a class is declared. One of the methods of the class, namely:
public:
void setTimeout(void){m_dtDateTime.setNow();}
was mistakenly defined as:
void setTimeout(void){m_dtDateTime.setNow;}.
This resulted in a segfault. "setNow" is a:
void setNow(void);
and is a member of another class.
"setTimeout" is on line 59 in the header file. Here's the command line and the error msgs:
c++ -DHAVE_CONFIG_H -I. -I. -I.. -I /home/alexe/work/vm/vmshared -I /home/alexe/work/vm/vminternal -I /home/alexe/work/vm/vminternal/tcp -I /home/alexe/work/bm/bminternal/threads -I /home/alexe/work/bm/bminternal/packets -I /usr/local/ssl/include -g -g -O2 -Wall -Wno-unused -c VMScheduler.cpp
VMScheduler.h: In method `BOOL VMScheduler::forceEvent (int, BMObject
*, int)':
VMScheduler.h:59: Internal error: Segmentation fault.
After correcting the error the code compiled properly (no warnings, no errors) and there was no segfault anymore.
I am sorry for being unable to submit the full source to you, but will gladly answer your questions if you have any. Here's the class declaration:
class SMSTimerEvent : public VMObject
{
friend VMScheduler;
ccDateTime m_dtDateTime;
smsTimerCode_t m_iCode;
BOOL m_bRecurring;
public:
SMSTimerEvent(){m_iCode = TE_INVALID; setParent(NULL); setEmplr(NULL);};
SMSTimerEvent(ccDateTime& t, smsTimerCode_t c, BOOL recr, VMObject* ptrObj, VMObject* ptrParent);
BOOL isTimeout(void){return m_dtDateTime.isExpired();}
void setTimeout(void){m_dtDateTime.setNow();}
BOOL isRecurring(void){return m_bRecurring;}
virtual ~SMSTimerEvent(){};
void dump(int=0);
void process(void);
};
>How-To-Repeat:
>Fix:
After correcting the error (i.e. put brackets after function call) the code compiled properly (no warnings, no errors) and there was no segfault anymore.
Same code compiles and runs properly with gcc ver 2.91.
>Release-Note:
>Audit-Trail:
>Unformatted: