From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 38676 invoked by alias); 26 May 2017 01:53:19 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 38315 invoked by uid 89); 26 May 2017 01:53:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=zi, H*M:google X-HELO: mail-oi0-f41.google.com Received: from mail-oi0-f41.google.com (HELO mail-oi0-f41.google.com) (209.85.218.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 26 May 2017 01:53:16 +0000 Received: by mail-oi0-f41.google.com with SMTP id l18so301640179oig.2 for ; Thu, 25 May 2017 18:53:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:references:to:subject :user-agent; bh=3CJhvfk2ZN3dsWIB6mIBSbGPsp4A2xTUmixJL031ZtA=; b=F4a7Ge8Dd7gCqWH9rQ+bKAc0ChHoqJELQhsiqscltjkS6J+337Uj6ZqSI5ADvxsiLs l3mk+NLxxmXE82+oxBeGSpOQ534mGf88N6vMsd9iormf+IKydDKylNJrCWnGh4bif2by vEsDfg8tfCTL+LiR9BAmUDo/zAttMOatWeHzmvOjjijz+CIpi7XfDz2oifeJFwQrFx1d f+NRku7LpnoFkvqe5acw3UP7HH6v5csIvzkj3ZA6alPWHx5+Z3TZgxaRN7gb6ZUL9XNN kjcnn127cbwS2sC+sKAjgaefHvBV8Re74PcyonNUPNR8gf26wrSmnZYgBQi01U7NkpH7 oUyg== X-Gm-Message-State: AODbwcC1L3ImU+az2rULP9EfjuEIowx6Ye+4LrBeQuHX2KcW+qsXYnk7 oUSvP7tbGWmEupMB X-Received: by 10.157.82.87 with SMTP id q23mr8321176otg.52.1495763598632; Thu, 25 May 2017 18:53:18 -0700 (PDT) Received: from KiZ ([2605:6000:9fc0:56:813:bad7:424c:e627]) by smtp.gmail.com with ESMTPSA id p73sm4237359oic.29.2017.05.25.18.53.17 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 May 2017 18:53:17 -0700 (PDT) Message-ID: <59278a8d.4c72ca0a.40c07.37ed@mx.google.com> Date: Fri, 26 May 2017 05:01:00 -0000 From: Steven Penny X-Google-Original-From: Steven Penny References: <5927885e.b5169d0a.fd65e.370a@mx.google.com> To: cygwin@cygwin.com Subject: Re: bug in lrint [was: FW: Printing long int in C program under cygwin64] Content-Type: text/plain; charset=utf8; format=flowed User-Agent: Tryst/2.0.1 (github.com/svnpenn/tryst) X-SW-Source: 2017-05/txt/msg00426.txt.bz2 On Thu, 25 May 2017 18:43:58, Steven Penny wrote: > Uh, have you actually tried this? It doesnt do anything: > > $ cat alfa.c > #define __USE_MINGW_ANSI_STDIO 1 > #include > int main() { > printf("%zi %zu %llu\n", __SIZE_MAX__, __SIZE_MAX__, __SIZE_MAX__); > } > > $ x86_64-w64-mingw32-gcc -Wformat-signedness -o alfa alfa.c Correcting myself: you need 2 flags to get this working: $ x86_64-w64-mingw32-gcc -Wformat -Wformat-signedness alfa.c alfa.c: In function ‘main’: alfa.c:11:10: warning: format ‘%zi’ expects argument of type ‘signed size_t’, but argument 2 has type ‘long long unsigned int’ [-Wformat=] printf("%zi %zu %llu\n", __SIZE_MAX__, __SIZE_MAX__, __SIZE_MAX__); ^ -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple