public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "alx at kernel dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/97100] -Wformat checks all arms of _Generic leading to irrelevant type expectation warnings
Date: Tue, 16 Apr 2024 03:07:37 +0000	[thread overview]
Message-ID: <bug-97100-4-nMqDYlXP2h@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-97100-4@http.gcc.gnu.org/bugzilla/>

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

Alejandro Colomar <alx at kernel dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |alx at kernel dot org

--- Comment #5 from Alejandro Colomar <alx at kernel dot org> ---
I can still reproduce it, using gcc-14 from Debian RC-Buggy.


alx@debian:~/tmp/c$ gcc-14 -Wall -Wextra g.c -S
g.c: In function ‘main’:
g.c:96:21: error: passing argument 1 of ‘a2si_c’ from incompatible pointer type
[-Wincompatible-pointer-types]
   96 |         a2i(time_t, &t, "42", NULL, 0, 0, 10);
      |                     ^~
      |                     |
      |                     time_t * {aka long int *}
g.c:30:11: note: in definition of macro ‘a2si’
   30 |         )(n, s, endp, base, min, max)                                  
      \
      |           ^
g.c:96:9: note: in expansion of macro ‘a2i’
   96 |         a2i(time_t, &t, "42", NULL, 0, 0, 10);
      |         ^~~
g.c:54:22: note: expected ‘int * restrict’ but argument is of type ‘time_t *’
{aka ‘long int *’}
   54 | a2si_c(int *restrict n, const char *s,
      |        ~~~~~~~~~~~~~~^
alx@debian:~/tmp/c$ gcc-14 --version
gcc-14 (Debian 14-20240330-1) 14.0.1 20240330 (experimental) [master
r14-9728-g6fc84f680d0]
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

  parent reply	other threads:[~2024-04-16  3:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-18  0:56 [Bug c/97100] New: " sherzberg+gcc at freeshell dot org
2023-07-17 12:11 ` [Bug c/97100] " Hi-Angel at yandex dot ru
2023-08-04  6:06 ` muecker at gwdg dot de
2023-08-05  8:40 ` cvs-commit at gcc dot gnu.org
2023-11-03 19:26 ` uecker at gcc dot gnu.org
2024-04-16  3:07 ` alx at kernel dot org [this message]
2024-04-16  3:08 ` alx at kernel dot org
2024-04-16  5:35 ` uecker at gcc dot gnu.org
2024-04-16  5:58 ` Hi-Angel at yandex dot ru
2024-04-16  6:03 ` uecker at gcc dot gnu.org
2024-04-16  6:27 ` Hi-Angel at yandex dot ru
2024-04-16  7:02 ` muecker at gwdg dot de
2024-04-16  7:33 ` Hi-Angel at yandex dot ru
2024-04-16  8:23 ` muecker at gwdg dot de
2024-04-16  9:55 ` alx at kernel dot org

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-97100-4-nMqDYlXP2h@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).