public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/97858] New: [11 regression] Bogus warnings about va_list during profiledbootstrap
@ 2020-11-16 18:39 hubicka at gcc dot gnu.org
  2020-11-16 22:07 ` [Bug bootstrap/97858] " hubicka at gcc dot gnu.org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: hubicka at gcc dot gnu.org @ 2020-11-16 18:39 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97858
           Summary: [11 regression] Bogus warnings about va_list during
                    profiledbootstrap
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hubicka at gcc dot gnu.org
  Target Milestone: ---

During profiledbootstrap we get the following warnings:
../libcpp/../../libcpp/mkdeps.c: In function ‘munge.constprop’:
../libcpp/../../libcpp/mkdeps.c:176:13: warning: ‘MEM[(struct 
*)&args].reg_save_area’ may be used uninitialized [-Wmaybe-uninitialized]
  176 |         str = va_arg (args, const char *);
      |             ^
../libcpp/../../libcpp/mkdeps.c:120:11: note: ‘MEM[(struct 
*)&args].reg_save_area’ was declared here
  120 |   va_list args;
      |           ^
../libcpp/../../libcpp/mkdeps.c:176:13: warning: ‘MEM[(struct 
*)&args].overflow_arg_area’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
  176 |         str = va_arg (args, const char *);
      |             ^
../libcpp/../../libcpp/mkdeps.c:120:11: note: ‘MEM[(struct 
*)&args].overflow_arg_area’ was declared here
  120 |   va_list args;
      |           ^
../libcpp/../../libcpp/mkdeps.c:176:13: warning: ‘MEM[(struct 
*)&args].gp_offset’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
  176 |         str = va_arg (args, const char *);
      |             ^
../libcpp/../../libcpp/mkdeps.c:120:11: note: ‘MEM[(struct  *)&args].gp_offset’
was declared here
  120 |   va_list args;
      |           ^

This seems to be due to conditional initialization of va_list:
static const char *                                                             
munge (const char *str, const char *trail = NULL, ...)                          
{                                                                               
  static unsigned alloc;                                                        
  static char *buf;                                                             
  unsigned dst = 0;                                                             
  va_list args;                                                                 
  if (trail)                                                                    
    va_start (args, trail);                                                     

but it does not make much sense to me to warn about internals of va_arg
iplementation at first place.  It is not user visible.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-04-09 19:10 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [Bug middle-end/97858] avoid mentioning va_list internal fields in -Wuninitialized msebor at gcc dot gnu.org

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).