From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7458 invoked by alias); 1 Feb 2003 21:28:05 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 7439 invoked by uid 48); 1 Feb 2003 21:28:05 -0000 Date: Sat, 01 Feb 2003 21:28:00 -0000 Message-ID: <20030201212804.7438.qmail@sources.redhat.com> To: comer@mailru.com, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org From: bangerth@dealii.org Reply-To: bangerth@dealii.org, comer@mailru.com, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org Subject: Re: c++/6273: [2003-01-30] User-defined operator+ and use of enum values in computation of array bounds X-SW-Source: 2003-02/txt/msg00025.txt.bz2 List-Id: Old Synopsis: [2003-01-20] ICE in tree_low_cst, at tree.c:3471, also an error with gcc 2.95.3 New Synopsis: [2003-01-30] User-defined operator+ and use of enum values in computation of array bounds State-Changed-From-To: open->analyzed State-Changed-By: bangerth State-Changed-When: Sat Feb 1 21:28:04 2003 State-Changed-Why: With recent snapshots, it's not an ICE any more. However, when reducing the code to the following ----------------------- template struct X { enum { N = 10 }; int items[N+1]; }; template int operator+(A,B); X x; ------------------------ we still get an error: test/x> ../../bin/gcc-2003-01-30/bin/c++ -c x.cc x.cc:6: error: variable-size type declared outside of any function x.cc:6: error: variable-size type declared outside of any function Apparently, the user-defined template op+ is used to determine the array size. I don't know whether this is right or wrong... W. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6273