Thread View: gnu.g++.bug
1 messages
1 total messages
Started by Ron Guilmette
Fri, 21 Apr 1989 19:28
BUG(s) in G++ 1.34.1 and 1.35.0 (pre-release)
Author: Ron Guilmette
Date: Fri, 21 Apr 1989 19:28
Date: Fri, 21 Apr 1989 19:28
52 lines
1314 bytes
1314 bytes
The following source file causes G++ 1.34.1 (Sun3) and G++ 1.35.0 (Sun3,
pre-release from yahi April 20th) to abort.
-----------------------------------------------------------------------
// Check that default arguments may be non constant expressions
// #include "Testinc.h"
int global_variable;
const int global_const = 99;
int func1 (int i);
int func2 (int j);
int function (int k = func2 (func1 (global_variable + global_const)));
class base {
int field;
public:
int function (int k = func2 (func1 (global_variable + global_const)));
};
int test ()
{
base b;
global_variable = 99;
function ();
b.function ();
return 0;
}
int function (int k = func2 (func1 (global_variable + global_const)))
{
return 0;
}
int base::function (int k = func2 (func1 (global_variable + global_const)))
{
return 0;
}
int func1 (int i)
{
return 1+i;
}
int func2 (int j)
{
return 2+j;
}
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads