From patchwork Wed May 14 11:10:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Georg-Johann Lay X-Patchwork-Id: 348748 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 92343140094 for ; Wed, 14 May 2014 21:09:39 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; q=dns; s=default; b=j/GZ4JSEewST13/MjabKGrCNMLeGRzGekFfl/i7QoTI 4TKd4gh1y2D22kWn7Kpz7Gn/8w34JG8NL8NvHvlhu/7MQFetmjRPm5ZV1gjvVBXD 2dOcz79sLGzTDo3Br5YxvO7qpT95xnw0rkGFr1fqVUGYvIPMBU4PbOwNrMKO3KrI = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; s=default; bh=8J9uns24CVxOOBB54YYQKDDMHv8=; b=ZooUd+bU/H5mo/lT9 VC4kbn4vuayHXB0URqXtMX4rdGLpTmIADJnYsX3ViAcdyR2sJQIFuc+hJGVRNSBB P1y5jCOeRvZoWPj8yD1Ps5mWuTPvm6pyfyQ6Cy3ibW6FNFGLBdSgyYQEBCX+LC/m Bc9AT01i/i3GmcSE+BRCIdHBec= Received: (qmail 25941 invoked by alias); 14 May 2014 11:09:33 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 25928 invoked by uid 89); 14 May 2014 11:09:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: mo4-p00-ob.smtp.rzone.de Received: from mo4-p00-ob.smtp.rzone.de (HELO mo4-p00-ob.smtp.rzone.de) (81.169.146.217) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 14 May 2014 11:09:31 +0000 X-RZG-AUTH: :LXoWVUeid/7A29J/hMvvT3ol15ykJcYwTPbBBR62PQ25nZqaVhI= X-RZG-CLASS-ID: mo00 Received: from [192.168.0.22] (91-67-174-249-dynip.superkabel.de [91.67.174.249]) by smtp.strato.de (RZmta 33.3 DYNA|AUTH) with ESMTPSA id 906f9bq4EB9Pou5 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate); Wed, 14 May 2014 13:09:25 +0200 (CEST) Message-ID: <53734F36.10000@gjlay.de> Date: Wed, 14 May 2014 13:10:46 +0200 From: Georg-Johann Lay User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130911 Thunderbird/17.0.9 MIME-Version: 1.0 To: GCC Patches CC: Denis Chertykov , "Selvaraj, Senthil_Kumar" Subject: [patch, avr, committed] Fix build warnings caused by REG_CLASS_CONTENTS X-IsSubscribed: yes https://gcc.gnu.org/r210418 Applied this patch in order to fixed build warnings like these gcc/reginfo.c:115:5: warning: narrowing conversion of ‘-1073741824’ from ‘int’ to ‘const unsigned int’ inside { } is ill-formed in C++11 [-Wnarrowing] gcc/reginfo.c:115:5: warning: narrowing conversion of ‘-268435456’ from ‘int’ to ‘const unsigned int’ inside { } is ill-formed in C++11 [-Wnarrowing] gcc/reginfo.c:115:5: warning: narrowing conversion of ‘-67108864’ from ‘int’ to ‘const unsigned int’ inside { } is ill-formed in C++11 [-Wnarrowing] gcc/reginfo.c:115:5: warning: narrowing conversion of ‘-16777216’ from ‘int’ to ‘const unsigned int’ inside { } is ill-formed in C++11 [-Wnarrowing] gcc/reginfo.c:115:5: warning: narrowing conversion of ‘-65536’ from ‘int’ to ‘const unsigned int’ inside { } is ill-formed in C++11 [-Wnarrowing] on I32 hosts that are caused by expressions like 3 << 30 in REG_CLASS_CONTENTS initializer. Johann * config/avr/avr.h (REG_CLASS_CONTENTS): Use unsigned suffix for shifted values to avoid build warning. Index: config/avr/avr.h =================================================================== --- config/avr/avr.h (revision 210276) +++ config/avr/avr.h (working copy) @@ -251,18 +251,18 @@ enum reg_class { #define REG_CLASS_CONTENTS { \ {0x00000000,0x00000000}, /* NO_REGS */ \ {0x00000001,0x00000000}, /* R0_REG */ \ - {3 << REG_X,0x00000000}, /* POINTER_X_REGS, r26 - r27 */ \ - {3 << REG_Y,0x00000000}, /* POINTER_Y_REGS, r28 - r29 */ \ - {3 << REG_Z,0x00000000}, /* POINTER_Z_REGS, r30 - r31 */ \ + {3u << REG_X,0x00000000}, /* POINTER_X_REGS, r26 - r27 */ \ + {3u << REG_Y,0x00000000}, /* POINTER_Y_REGS, r28 - r29 */ \ + {3u << REG_Z,0x00000000}, /* POINTER_Z_REGS, r30 - r31 */ \ {0x00000000,0x00000003}, /* STACK_REG, STACK */ \ - {(3 << REG_Y) | (3 << REG_Z), \ + {(3u << REG_Y) | (3u << REG_Z), \ 0x00000000}, /* BASE_POINTER_REGS, r28 - r31 */ \ - {(3 << REG_X) | (3 << REG_Y) | (3 << REG_Z), \ + {(3u << REG_X) | (3u << REG_Y) | (3u << REG_Z), \ 0x00000000}, /* POINTER_REGS, r26 - r31 */ \ - {(3 << REG_X) | (3 << REG_Y) | (3 << REG_Z) | (3 << REG_W), \ + {(3u << REG_X) | (3u << REG_Y) | (3u << REG_Z) | (3u << REG_W), \ 0x00000000}, /* ADDW_REGS, r24 - r31 */ \ {0x00ff0000,0x00000000}, /* SIMPLE_LD_REGS r16 - r23 */ \ - {(3 << REG_X)|(3 << REG_Y)|(3 << REG_Z)|(3 << REG_W)|(0xff << 16), \ + {(3u << REG_X)|(3u << REG_Y)|(3u << REG_Z)|(3u << REG_W)|(0xffu << 16),\ 0x00000000}, /* LD_REGS, r16 - r31 */ \ {0x0000ffff,0x00000000}, /* NO_LD_REGS r0 - r15 */ \ {0xffffffff,0x00000000}, /* GENERAL_REGS, r0 - r31 */ \