From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3473 invoked by alias); 19 Aug 2008 04:55:18 -0000 Received: (qmail 3462 invoked by uid 22791); 19 Aug 2008 04:55:17 -0000 X-Spam-Check-By: sourceware.org Received: from mail.redpinesignals.com (HELO mail.redpinesignals.com) (203.196.161.92) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 19 Aug 2008 04:54:43 +0000 Received: from [192.168.1.121] ([192.168.1.121]) (authenticated user sivaprasad.pv@redpinesignals.com) by mail.redpinesignals.com for gcc-help@gcc.gnu.org; Tue, 19 Aug 2008 10:20:56 +0530 Message-ID: <48AA5377.9080001@redpinesignals.com> Date: Tue, 19 Aug 2008 08:38:00 -0000 From: "Sivaprasad.pv" User-Agent: Thunderbird 2.0.0.4 (X11/20070604) MIME-Version: 1.0 To: gcc Subject: regarding type promotion Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-08/txt/msg00164.txt.bz2 Hi All, If we consider following sample C language code : long long int k=0x123; int p=1; k = k + p << 33; Here the value in variable 'p' is shifted by 33 and then the result (only 32 bit result)was promoted to 64 bit. Is it an expected behavior? Is there any way to specify in gcc to perform implicit type promotion first and then perform operation on it (without explicit type casting). Thanks, Siva Prasad