From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24572 invoked by alias); 12 Jun 2010 16:46:47 -0000 Received: (qmail 24519 invoked by uid 48); 12 Jun 2010 16:46:25 -0000 Date: Sat, 12 Jun 2010 16:46:00 -0000 Message-ID: <20100612164625.24518.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/40752] -Wconversion generates false warnings for operands not larger than target type In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "photon at seznam dot cz" 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-06/txt/msg01419.txt.bz2 ------- Comment #18 from photon at seznam dot cz 2010-06-12 16:46 ------- (In reply to comment #17) > The patch was rejected but it may be accepted by using a new -Wno-* option to > disable these warnings. Perhaps -Wno-conversion-after-promotion? > > Suggestions are welcome. > -Wconversion should be fixed to work as specified. No warning should be generated for the following code: char c = 2; // warning: conversion to ‘char’ from ‘int’ may alter its value c >>= 1; -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40752