From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7063 invoked by alias); 10 Apr 2012 16:08:53 -0000 Received: (qmail 7046 invoked by uid 22791); 10 Apr 2012 16:08:51 -0000 X-SWARE-Spam-Status: No, hits=-0.8 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.datasphere.ch (HELO mail.datasphere.ch) (195.70.3.149) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 10 Apr 2012 16:08:38 +0000 Received: from dataspheresrv01.datasphere.ch ([195.70.3.151]) by mail.datasphere.ch (8.14.4/8.14.4) with ESMTP id q3AG8WWY003175 for ; Tue, 10 Apr 2012 18:08:37 +0200 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: [PATCH] print format does not match argument type Date: Tue, 10 Apr 2012 16:08:00 -0000 Message-ID: In-Reply-To: <4F8443D1.9080105@onevision.com> References: <4F8443D1.9080105@onevision.com> From: "Patrick Monnerat" To: X-IsSubscribed: yes Mailing-List: contact insight-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-owner@sourceware.org X-SW-Source: 2012-q2/txt/msg00006.txt.bz2 =20 Roland Schwingel wrote: > The TYPE_FIELD_TYPE macro returns a pointer to a struct type. > Treating this as (unsigned) long is pretty correct on *nix style > systems but not on windows. On 64bit windows a long is still 4 bytes > long, so the downcasted value is simply wrong. I think I've found the universal (well: almost!) coding: Use format "%llx" and cast arg to (unsigned long long): This is C99 and supported by MSVC, at least since 2005. Not OK for C89 :-( I hope it helps. Patrick