[gnu.g++.bug] g++ 1.34.2 seg violation

francis%sunquest.UUCP@ARIZONA.EDU ("Francis Sullivan") (09/27/89)

%
% cat seg.cc
seg.cc: No such file or directory
% cd cppbug
%
% cat seg.cc
extern "C" {
#include <sys/types.h>
}
main() {
int i = 1;
}
% g++ -v
g++ version 1.34.2
% cat /etc/motd
SunOS Release 4.0 (SQDL60) #1: Fri Mar 10 18:55:26 MST 1989
% g++ seg.cc
/usr/include/sys/types.h:32: Segmentation violation
Program c++ got fatal signal 11.
%
--
I don't know if the extern syntax is correct, but it still shouldn't
get the violation

schmidt@glacier.ics.uci.edu (Doug Schmidt) (09/27/89)

In article <8909262317.AA00506@yeager>, francis%sunquest ("Francis Sullivan") writes:
>extern "C" {
>#include <sys/types.h>
>}
>main() {
>int i = 1;
>}
>% g++ -v
>g++ version 1.34.2
>% cat /etc/motd
>SunOS Release 4.0 (SQDL60) #1: Fri Mar 10 18:55:26 MST 1989
>% g++ seg.cc
>/usr/include/sys/types.h:32: Segmentation violation
>Program c++ got fatal signal 11.
>%
>--
>I don't know if the extern syntax is correct, but it still shouldn't
>get the violation

The solution to this problem is to get hold of a more recent version
of the g++ compiler.  Check out labrea.stanford.edu in the ~ftp/pub/gnu
directory, g++.ytar.Z.  This program compiles just fine with g++ 1.36.0-.

Doug
--
schmidt@ics.uci.edu (ARPA) |   Per me si va nella citta' dolente.
office: (714) 856-4043     |   Per me si va nell'eterno dolore.
                           |   Per me si va tra la perduta gente.
                           |   Lasciate ogni speranza o voi ch'entrate.

tiemann@SUN.COM (Michael Tiemann) (09/27/89)

Version 1.34.2 is very old.  Try 1.36.0, which is now in test release.

Michael