public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "tomas.kalibera at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/95130] GCC ignoring attribute(format(gnu_printf)) on printf in mingw
Date: Mon, 22 Nov 2021 21:21:46 +0000	[thread overview]
Message-ID: <bug-95130-4-RehDYBxjCu@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-95130-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95130

Tomas Kalibera <tomas.kalibera at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tomas.kalibera at gmail dot com

--- Comment #2 from Tomas Kalibera <tomas.kalibera at gmail dot com> ---
My apologies if this is obvious, but please let me note this issue means that
one cannot print(f) a 64-bit integer without a compile-time warning with UCRT
on Windows. It would be a great help if this could somehow be fixed.

In the example below, lines (1) and (2) work without a warning with MSVCRT.
But, all three issue a warning with UCRT.

#include <inttypes.h>
#include <stdio.h>

int main(int argc, char **argv) {
  long long unsigned x = 112;

  printf("Hello %"PRIu64"\n", x); // 1
  printf("Hello %I64u\n", x);     // 2
  printf("Hello %llu\n", x);      // 3
  return 0;
}

  parent reply	other threads:[~2021-11-22 21:21 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-14 11:37 [Bug c/95130] New: " martin at martin dot st
2020-05-14 17:27 ` [Bug c/95130] " joseph at codesourcery dot com
2021-11-22 21:21 ` tomas.kalibera at gmail dot com [this message]
2021-12-15 17:27 ` tomas.kalibera at gmail dot com
2021-12-15 17:29 ` tomas.kalibera at gmail dot com
2021-12-15 17:45 ` tomas.kalibera at gmail dot com
2022-10-25  7:10 ` lh_mouse at 126 dot com
2022-10-25 16:46 ` tomas.kalibera at gmail dot com
2022-10-25 19:40 ` martin at martin dot st
2022-10-26  7:03 ` tomas.kalibera at gmail dot com
2022-10-26 10:09 ` lh_mouse at 126 dot com
2022-10-26 12:04 ` tomas.kalibera at gmail dot com
2022-10-26 15:27 ` tomas.kalibera at gmail dot com
2022-12-15 15:42 ` tomas.kalibera at gmail dot com
2023-01-29 18:20 ` alvinhochun at gmail dot com
2023-08-02  2:06 ` tanksherman27 at gmail dot com
2023-08-02 13:15 ` tomas.kalibera at gmail dot com
2023-08-03 16:33 ` tomas.kalibera at gmail dot com
2023-08-17  6:11 ` tanksherman27 at gmail dot com
2023-08-19 10:18 ` tanksherman27 at gmail dot com
2023-08-19 19:11 ` tomas.kalibera at gmail dot com
2023-08-20  2:22 ` cvs-commit at gcc dot gnu.org
2023-08-21 12:50 ` tomas.kalibera at gmail dot com
2024-04-19  2:53 ` pinskia at gcc dot gnu.org
2024-04-19  3:28 ` lh_mouse at 126 dot com
2024-04-19  7:04 ` martin at martin dot st
2024-04-19  7:12 ` lh_mouse at 126 dot com
2024-04-19  7:13 ` pinskia at gcc dot gnu.org
2024-04-19  7:27 ` lh_mouse at 126 dot com

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=bug-95130-4-RehDYBxjCu@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).