Thread View: gnu.g++.bug
1 messages
1 total messages
Started by ojr
Mon, 30 Oct 1989 10:04
SEGV in late extern "C"
Author: ojr
Date: Mon, 30 Oct 1989 10:04
Date: Mon, 30 Oct 1989 10:04
43 lines
1426 bytes
1426 bytes
The following program causes a segment violation both on sparcstation
and sun3.
Our configuration:
sun-os4
sun3/sun4
g++ version 1.36- last changed Wed Oct 11 1989
----------------------------------------
class A
{
public:
A() {printf("Hello world\n");}
};
extern "C"
{
void printf(char*,...);
};
A a;
-----------------------------------------
g++ -v
gcc version 1.36.0- (based on GCC 1.36)
g++ -c bug2.cc
g++ -c bug2.cc
bug2.cc: In method A::A ():
bug2.cc:19: warning: implicit declaration of function `printf'
bug2.cc: At top level:
bug2.cc:24: warning: `printf' was previously implicitly declared to return `int'
bug2.cc: In function void _GLOBAL_$I$bug2_cc ():
bug2.cc:19: warning: bug2.cc:27: Segmentation violation
g++: Program cc1plus got fatal signal 11.
Ornulf Jan Rodseth M.Sc. Telephone
SINTEF Dep. of Automatic Control (+47 7) 594351 Direct
N-7034 TRONDHEIM (+47 7) 594375 Switchboard
NORWAY (+47 7) 594399 Fax
ojr%regtek.unit.uninett@tor.nta.no (EAN) ojr@itk.unit.no (ARPA)
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