Thread View: gnu.g++.bug
1 messages
1 total messages
Started by Brian Marsh
Tue, 14 Feb 1989 13:37
Bogus error message
Author: Brian Marsh
Date: Tue, 14 Feb 1989 13:37
Date: Tue, 14 Feb 1989 13:37
49 lines
1478 bytes
1478 bytes
The following short program generates an error message in which
the actual parameter causing the violation is the *third* argument,
not the *second* as reported by the compiler.
1 % g++ -v
g++ version 1.32.0
2 % cat bug.cc
struct chars
{
char contents[ 3 ] ;
}
struct type_d ;
struct oper_d
{
oper_d( type_d *Argument, type_d *Result, chars *Label ) ;
} ;
struct type_d
{
int size ;
type_d( ) ;
} ;
struct build_d : type_d
{
type_d *base ;
build_d( type_d *Base, type_d *Argument ) ;
} ;
build_d::build_d( type_d *Base, type_d *Argument )
{
size = 0 ;
base = Base ;
oper_d *oper = new oper_d( Argument, Base, (char *)0 ) ;
}
3 % g++ bug.cc
bug.cc:7: semicolon missing after declaration of `chars'
In function struct build_d *build_d::build_d (struct type_d *, struct type_d *)
:
bug.cc:33: bad argument 2 for function `oper_d::oper_d (struct type_d *, struct
type_d *, struct chars *)' (type was struct type_d *)
4 %
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