Path: utzoo!telly!ddsw1!lll-winken!killer!pollux!ti-csl!cs.utexas.edu!tut.cis.ohio-state.edu!iam.unibe.ch!metz From: metz@iam.unibe.ch (Igor Metz) Newsgroups: gnu.g++.bug Subject: g++ 1.27.0 Message-ID: <562*metz@iam.unibe.ch> Date: 26 Sep 88 10:57:00 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 201 Hi, I have some problems with the latest g++ version. I compile it on my SUN 3/260 (SunOS 3.5) and I get the following warnings from gcc 1.27 ===== the beginning ====== gcc -g -c fold-const.c In function fold: fold-const.c:1435: warning: comparison is always 0 due to limited range of data type fold-const.c:1452: warning: comparison is always 0 due to limited range of data type gcc -g -c expr.c In function expand_increment: expr.c:3258: warning: comparison is always 0 due to limited range of data type expr.c:3258: warning: comparison is always 0 due to limited range of data type gcc -g -c class.c In function instantiate_type: class.c:3454: warning: case value out of range class.c:3455: warning: case value out of range class.c:3456: warning: case value out of range class.c:3457: warning: case value out of range gcc -g -c method.c In function dump_init: method.c:690: warning: case value out of range method.c:691: warning: case value out of range method.c:696: warning: case value out of range method.c:697: warning: case value out of range gcc -g -c search.c In function my_tree_cons: search.c:172: warning: initialization between incompatible pointer types In function my_build_string: search.c:186: warning: initialization between incompatible pointer types ==== the end ==== When I then try to compile the following little program, gcc-c++ abort()'s itself (see below for typescript of gdb session), when it tries to expand an expression: ==== the beginning ==== #includeconst int dim = 10; class Vektor { short vec[dim]; public: Vektor(); short& operator[](int i) { return(vec[i]); } }; Vektor::Vektor() { for (int i= 0; i