c++/2005: loop in gcc when function has const additional
waratah@zip.com.au
waratah@zip.com.au
Fri Feb 16 04:36:00 GMT 2001
>Number: 2005
>Category: c++
>Synopsis: loop in gcc when function has const additional
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Feb 16 04:36:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Ken Foskey
>Release: gcc version 2.95.2 19991024 (release)
>Organization:
>Environment:
Linux RH 6.2 with compiler upgrade
>Description:
Compiler goes into an infinite loop with the following code.
Code works fine on Solaris compiler.
void log_error( char * str )
{
rtrim( str );
log_error( (const char *) str );
}
/******************************************************
*
* Take an error and store it on the database
*
******************************************************/
void log_error( const char * str )
{
}
Compiler appears to loop through the non-const call and
eventually blows the stack.
Reason for the code is solaris treats "xyz" as a constant
string and warns of chance of changing const string.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list