From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28825 invoked by alias); 9 Jan 2002 16:36:01 -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 28793 invoked by uid 71); 9 Jan 2002 16:36:01 -0000 Resent-Date: 9 Jan 2002 16:36:01 -0000 Resent-Message-ID: <20020109163601.28792.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, dima@cc.hut.fi Received:(qmail 27632 invoked by uid 61); 9 Jan 2002 16:33:25 -0000 Message-Id:<20020109163325.27629.qmail@sources.redhat.com> Date: Wed, 09 Jan 2002 08:36:00 -0000 From: dima@cc.hut.fi Reply-To: dima@cc.hut.fi To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version:gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c/5336: initializer element is not constant X-SW-Source: 2002-01/txt/msg00382.txt.bz2 List-Id: >Number: 5336 >Category: c >Synopsis: initializer element is not constant >Confidential: no >Severity: non-critical >Priority: low >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Wed Jan 09 08:36:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: dima@cc.hut.fi >Release: 2.96 (*g*), 3.0.1 >Organization: >Environment: >Description: compiler exits with error on code which is legal at least in common sense. when comiling something like: int * const ptr1 = (int *) 0xf0f0f0f0; int * const ptr2 = ptr1; compiler exits with error "initializer element is not constant", although it sorta is. it's not "a constant", but it sure is "constant". I'll go dig C docs, if it is indeed so that init element must be "a constant expression" then a change of error message would be good. >How-To-Repeat: int * const ptr1 = (int *) 0xf0f0f0f0; int * const ptr2 = ptr1; >Fix: >Release-Note: >Audit-Trail: >Unformatted: