From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2850 invoked by alias); 7 Nov 2010 07:16:37 -0000 Received: (qmail 2795 invoked by uid 22791); 7 Nov 2010 07:16:35 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 07 Nov 2010 07:16:31 +0000 From: "ian at airs dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/40935] [avr] conditional comparison uses short instead of char X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: ian at airs dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Status CC Resolution Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Sun, 07 Nov 2010 07:16:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-11/txt/msg00783.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40935 Ian Lance Taylor changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED CC| |ian at airs dot com Resolution| |INVALID --- Comment #2 from Ian Lance Taylor 2010-11-07 05:55:23 UTC --- I agree with Georg that there does not seem to be a bug here. When I compile with optimization this looks fine. Note that C states that all arithmetic operations are done in the type "int", which for AVR is the same size as the type "short" by default. This is done unless the optimizers can prove that it is unnecessary.