public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "msebor at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/97858] avoid mentioning va_list internal fields in -Wuninitialized
Date: Fri, 09 Apr 2021 19:10:40 +0000 [thread overview]
Message-ID: <bug-97858-4-kVEIbcxxJ4@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-97858-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97858
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2020-11-17 00:00:00 |2021-4-9
Summary|Bogus warnings about |avoid mentioning va_list
|va_list |internal fields in
| |-Wuninitialized
CC| |msebor at gcc dot gnu.org
--- Comment #12 from Martin Sebor <msebor at gcc dot gnu.org> ---
(In reply to Jan Hubicka from comment #7)
> Thanks, my original intention was to mostly track the fact that we do not
> want
> to warn about fields of va_list type that is internal to compiler though
> :)
To be clear: for the following test case you suggest to issue just the one
warning below:
$ cat pr97858.c && gcc -O2 -S -Wall pr97858.c
void f (__builtin_va_list);
int g (int i, ...)
{
__builtin_va_list ap;
// __builtin_va_start (ap, i);
int x = __builtin_va_arg (ap, int);
__builtin_va_end (ap);
return x;
}
pr97858.c: In function ‘g’:
pr97858.c:8:7: warning: ‘ap’ is used uninitialized [-Wuninitialized]
8 | int x = __builtin_va_arg (ap, int);
| ^
pr97858.c:5:21: note: ‘ap’ declared here
5 | __builtin_va_list ap;
| ^~
as opposed to the three GCC issues now:
pr97858.c: In function ‘g’:
pr97858.c:8:7: warning: ‘ap[0].gp_offset’ is used uninitialized
[-Wuninitialized]
8 | int x = __builtin_va_arg (ap, int);
| ^
pr97858.c:5:21: note: ‘ap’ declared here
5 | __builtin_va_list ap;
| ^~
pr97858.c:8:7: warning: ‘ap[0].reg_save_area’ may be used uninitialized
[-Wmaybe-uninitialized]
8 | int x = __builtin_va_arg (ap, int);
| ^
pr97858.c:5:21: note: ‘ap’ declared here
5 | __builtin_va_list ap;
| ^~
pr97858.c:8:7: warning: ‘ap[0].overflow_arg_area’ may be used uninitialized
[-Wmaybe-uninitialized]
8 | int x = __builtin_va_arg (ap, int);
| ^
pr97858.c:5:21: note: ‘ap’ declared here
5 | __builtin_va_list ap;
| ^~
prev parent reply other threads:[~2021-04-09 19:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-16 18:39 [Bug middle-end/97858] New: [11 regression] Bogus warnings about va_list during profiledbootstrap hubicka at gcc dot gnu.org
2020-11-16 22:07 ` [Bug bootstrap/97858] " hubicka at gcc dot gnu.org
2020-11-16 23:28 ` jakub at gcc dot gnu.org
2020-11-17 7:14 ` rguenth at gcc dot gnu.org
2020-11-17 12:50 ` nathan at gcc dot gnu.org
2020-11-17 14:47 ` cvs-commit at gcc dot gnu.org
2020-11-17 14:53 ` nathan at gcc dot gnu.org
2020-11-17 15:18 ` hubicka at ucw dot cz
2020-11-17 15:36 ` jakub at gcc dot gnu.org
2020-11-17 15:44 ` jakub at gcc dot gnu.org
2020-11-17 15:47 ` [Bug middle-end/97858] [11 regression] Bogus warnings about va_list hubicka at gcc dot gnu.org
2020-11-17 15:50 ` hubicka at gcc dot gnu.org
2021-01-14 9:38 ` [Bug middle-end/97858] " rguenth at gcc dot gnu.org
2021-04-09 19:10 ` msebor at gcc dot gnu.org [this message]
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-97858-4-kVEIbcxxJ4@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).