From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1637 invoked by alias); 15 May 2002 18:05:53 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 1518 invoked from network); 15 May 2002 18:05:22 -0000 Received: from unknown (HELO smtp-relay-1.adobe.com) (192.150.11.1) by sources.redhat.com with SMTP; 15 May 2002 18:05:22 -0000 Received: from inner-relay-1.corp.adobe.com (inner-relay-1 [153.32.1.51]) by smtp-relay-1.adobe.com (8.12.3/8.12.3) with ESMTP id g4FI7Bj4028035; Wed, 15 May 2002 11:07:12 -0700 (PDT) Received: from iplan-mn.corp.adobe.com (iplan-mn.corp.adobe.com [130.248.25.5]) by inner-relay-1.corp.adobe.com (8.12.3/8.12.3) with ESMTP id g4FI5guE006481; Wed, 15 May 2002 11:05:42 -0700 (PDT) Received: from [130.248.25.131] ([192.150.11.13]) by iplan-mn.corp.adobe.com (Netscape Messaging Server 4.15 mn Jul 11 2001 16:32:57) with ESMTP id GW5ZKY00.O08; Wed, 15 May 2002 13:05:22 -0500 User-Agent: Microsoft-Entourage/10.0.0.1331 Date: Wed, 15 May 2002 11:05:00 -0000 Subject: Re: Possible bug in gcc (Please Help)... From: John Love-Jensen To: Thomas J Amato , , Message-ID: In-Reply-To: Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-SW-Source: 2002-05/txt/msg00154.txt.bz2 Hi Tom, You cannot forward declare an enum in C++. The compiler can use a {signed|unsigned|nonsigned} char, short or int for it. But the compiler doesn't know what it is using until it sees the enum's definition. If it presumed that an enum was 1 byte, 2 byte, 4 byte, whatever, you may end up with an unfortunate scenario. My SAS/C++ compiler allows... signed short enum Foo { kOne = 1, kTwo, kThree }; (Or was it "enum signed short Foo { ..."?) ...but that's a SAS/C++ idiosyncratic extension to C++. In that situation, you could have forward declaration of the enum. --Eljay