From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26833 invoked by alias); 20 Oct 2004 21:46:51 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 26826 invoked by alias); 20 Oct 2004 21:46:50 -0000 Date: Wed, 20 Oct 2004 21:46:00 -0000 Message-ID: <20041020214650.26824.qmail@sourceware.org> From: "schlie at comcast dot net" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20041019202143.18065.schlie@comcast.net> References: <20041019202143.18065.schlie@comcast.net> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c/18065] usual arithmetic conversion not applying correctly X-Bugzilla-Reason: CC X-SW-Source: 2004-10/txt/msg02707.txt.bz2 List-Id: ------- Additional Comments From schlie at comcast dot net 2004-10-20 21:46 ------- Subject: Re: usual arithmetic conversion not applying correctly Andrew, And if it's already declared as, or cast to signed char's in the code? unsigned char x, y ; (signed char)x = (signed char)x / (signed char)y ; -or- (should yield identical code, and require no promotions or conversions) signed char x, y ; x = x / y ; the only arguable possible type conversion that may be required ; would be to convert the result of (x / y) which may have been ; implemented by the target machine as having a wider result, but ; not required if it's destination storage does not require it. (there's no reason to ever muck with specified object types unless it's value needs to converted as required for assignment, or the specified semantics of an operation; but even then, the type of the object doesn't change, although the its value's representation may if required.) -paul- > From: pinskia at gcc dot gnu dot org > Reply-To: > Date: 20 Oct 2004 19:54:55 -0000 > To: > Subject: [Bug c/18065] usual arithmetic conversion not applying correctly > > > ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-20 > 19:54 ------- > When I am talking about promoting means that we add casts. aka sc%sc gets > changed to (signed char) > (((int)sc)%((int)sc)). > > -- > > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18065 > > ------- You are receiving this mail because: ------- > You reported the bug, or are watching the reporter. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18065