From patchwork Fri Dec 26 21:18:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Metcalf X-Patchwork-Id: 4434 Received: (qmail 20767 invoked by alias); 26 Dec 2014 21:20:16 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 20752 invoked by uid 89); 26 Dec 2014 21:20:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: emea01-db3-obe.outbound.protection.outlook.com Message-ID: <201412262120.sBQLK4EC021618@farm-0002.internal.tilera.com> From: Chris Metcalf Date: Fri, 26 Dec 2014 16:18:40 -0500 Subject: [COMMITTED] tilegx32: avoid a a -Werror warning from unwinding To: X-EOPAttributedMessage: 0 Received-SPF: Fail (protection.outlook.com: domain of ezchip.com does not designate 12.216.194.146 as permitted sender) receiver=protection.outlook.com; client-ip=12.216.194.146; helo=farm-0002.internal.tilera.com; Authentication-Results: spf=fail (sender IP is 12.216.194.146) smtp.mailfrom=cmetcalf@ezchip.com; X-Forefront-Antispam-Report: CIP:12.216.194.146; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(339900001)(199003)(377424004)(189002)(104016003)(110136001)(21056001)(86362001)(575784001)(99396003)(103666002)(46102003)(120916001)(105606002)(48376002)(6806004)(50466002)(19580395003)(19580405001)(107886001)(42186005)(106476002)(106356001)(106466001)(229853001)(107046002)(2351001)(64706001)(77156002)(450100001)(62966003)(20776003)(47776003)(87936001)(68736005)(4396001)(54356999)(97736003)(50986999); DIR:OUT; SFP:1101; SCL:1; SRVR:AM3PR02MB035; H:farm-0002.internal.tilera.com; FPR:; SPF:Fail; MLV:sfv; PTR:InfoNoRecords; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:AM3PR02MB035; X-Forefront-PRVS: 04371797A5 X-OriginatorOrg: ezchip.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Dec 2014 21:20:05.8276 (UTC) X-MS-Exchange-CrossTenant-Id: 0fc16e0a-3cd3-4092-8b2f-0a42cff122c3 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=0fc16e0a-3cd3-4092-8b2f-0a42cff122c3; Ip=[12.216.194.146] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM3PR02MB035 The _Unwind_GetCFA() routine returns a 64-bit value, which we interpret as a pointer. Add an intermediate cast to long so that in ILP32 mode we don't get a warning about casting a wrong-sized integer to a pointer. --- ChangeLog | 5 +++++ sysdeps/tile/jmpbuf-unwind.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f7bfe913720a..3b01ed88d4da 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2014-12-26 Chris Metcalf + + * sysdeps/tile/jmpbuf-unwind.h (_JMPBUF_CFA_UNWINDS_ADJ): Cast to + long before casting to pointer to avoid a cast warning. + 2014-12-23 Chris Metcalf * sysdeps/tile/tilegx/Implies: New file. diff --git a/sysdeps/tile/jmpbuf-unwind.h b/sysdeps/tile/jmpbuf-unwind.h index 3925e905b115..ec0be21f902d 100644 --- a/sysdeps/tile/jmpbuf-unwind.h +++ b/sysdeps/tile/jmpbuf-unwind.h @@ -29,7 +29,7 @@ ((void *) (address) < (void *) demangle ((jmpbuf)[JB_SP])) #define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \ - _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj) + _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) (long) _Unwind_GetCFA (_context), _adj) static inline uintptr_t __attribute__ ((unused)) _jmpbuf_sp (__jmp_buf regs)