This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/2005: loop in gcc when function has const additional
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c++/2005: loop in gcc when function has const additional
- From: waratah at zip dot com dot au
- Date: 16 Feb 2001 12:35:08 -0000
- Reply-To: waratah at zip dot com dot au
>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: