This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/6805: Stack mess up with overloading a function...



>Number:         6805
>Category:       c++
>Synopsis:       Stack mess up with overloading a function...
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Fri May 24 15:56:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Stack index defect
>Release:        unknown-2.95.3
>Organization:
>Environment:
Linux
K6 200mhz
kernel 2.2.17
>Description:
When you trie to call overload a constructor function
like:

ACLASS::ACLASS()
{
	...some code here...
}

ACLASS::ACLASS(int something)
{
	...some code here...
	AFUNCTION();
	...some code here...
}

the code generated by gcc mess up the stack and call an other function.
>How-To-Repeat:

>Fix:
The idea to avoid that trouble is to create a function that contain
the code tant we want to share.
>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]