From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16999 invoked by alias); 15 May 2003 07:26:00 -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 16962 invoked by uid 71); 15 May 2003 07:26:00 -0000 Resent-Date: 15 May 2003 07:26:00 -0000 Resent-Message-ID: <20030515072600.16961.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, kevin@proximity.com.au Received: (qmail 12466 invoked by uid 48); 15 May 2003 07:24:01 -0000 Message-Id: <20030515072401.12465.qmail@sources.redhat.com> Date: Thu, 15 May 2003 07:26:00 -0000 From: kevin@proximity.com.au Reply-To: kevin@proximity.com.au To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/10796: gianormous enum values X-SW-Source: 2003-05/txt/msg01769.txt.bz2 List-Id: >Number: 10796 >Category: c++ >Synopsis: gianormous enum values >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: ice-on-illegal-code >Submitter-Id: net >Arrival-Date: Thu May 15 07:26:00 UTC 2003 >Closed-Date: >Last-Modified: >Originator: Kevin Cousins >Release: gcc version 3.2.2 >Organization: >Environment: Linux 2.4.18-17.7.x i686 >Description: In C++, according to Stroustrup, enums can grow to sizeof(int). On this machine, sizeof(int)==4, but I when exploring the maximum size enum value g++ would honour, I got an ICE. The following code (put it in a file called enum.C) COMPILES with given command line and runs $ cat enum.C <How-To-Repeat: Replace line in enum.C that says: acceptable = 0x7fffffffffffffff, with the following line: acceptable = -1, and attempt to compile with command line as given. >Fix: Don't use ridiculous enum values? Is that sufficient, or should the compiler be able to pick this up? >Release-Note: >Audit-Trail: >Unformatted: