From: Georg-Johann Lay <avr@gjlay.de>
To: GCC Patches <gcc-patches@gcc.gnu.org>,
Denis Chertykov <chertykov@gmail.com>
Subject: [patch,avr,committed]: Fix build warning for -1 in unsigned int initializers.
Date: Fri, 09 May 2014 12:18:00 -0000 [thread overview]
Message-ID: <536CC7A9.9060305@gjlay.de> (raw)
http://gcc.gnu.org/ml/gcc-cvs/2014-05/msg00311.html
Hi, applied this obvious patch to trunk in order to fix build warnings like these:
gcc/config/avr/avr-fixed.md:434:59: warning: narrowing conversion of â-1â from
âintâ to âconst unsigned intâ inside { } is ill-formed in C++11 [-Wnarrowing]
Thanks, Johann
gcc/
* config/avr/avr-fixed.md (round<mode>3): Use -1U instead of -1 in
unsigned int initializers for regno_in, regno_out.
Index: config/avr/avr-fixed.md
===================================================================
--- config/avr/avr-fixed.md (revision 210271)
+++ config/avr/avr-fixed.md (working copy)
@@ -430,8 +430,8 @@ (define_expand "round<mode>3"
}
// Input and output of the libgcc function
- const unsigned int regno_in[] = { -1, 22, 22, -1, 18 };
- const unsigned int regno_out[] = { -1, 24, 24, -1, 22 };
+ const unsigned int regno_in[] = { -1U, 22, 22, -1U, 18 };
+ const unsigned int regno_out[] = { -1U, 24, 24, -1U, 22 };
operands[3] = gen_rtx_REG (<MODE>mode, regno_out[(size_t) GET_MODE_SIZE
(<MODE>mode)]);
operands[4] = gen_rtx_REG (<MODE>mode, regno_in[(size_t) GET_MODE_SIZE
(<MODE>mode)]);
reply other threads:[~2014-05-09 12:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=536CC7A9.9060305@gjlay.de \
--to=avr@gjlay.de \
--cc=chertykov@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).