From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27611 invoked by alias); 19 May 2005 15:09:24 -0000 Mailing-List: contact java-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-prs-owner@gcc.gnu.org Received: (qmail 27493 invoked by uid 48); 19 May 2005 15:09:22 -0000 Date: Thu, 19 May 2005 15:09:00 -0000 Message-ID: <20050519150922.27492.qmail@sourceware.org> From: "hchapman-gcc-bugs at 3gfp dot com" To: java-prs@gcc.gnu.org In-Reply-To: <20050512200245.21540.green@redhat.com> References: <20050512200245.21540.green@redhat.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug java/21540] switch stmt problem X-Bugzilla-Reason: CC X-SW-Source: 2005-q2/txt/msg00501.txt.bz2 List-Id: ------- Additional Comments From hchapman-gcc-bugs at 3gfp dot com 2005-05-19 15:09 ------- gcc has this problem as well. Although, it will let you have an expression using only constants like case 'A' + ('B'<<8): but not case *((uint16_t *)"AB"): A gcc example: #include int main() { unsigned int xxx = 0x3456; switch(0x34) { case ((int)(xxx >> 16)): printf("Shift\n"); break; default: printf("No shift\n"); break; } return(0); } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21540