This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/41027] Missing warning from -Wc++-compat


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

Eric Gallager <egallager at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |egallager at gcc dot gnu.org
         Resolution|---                         |FIXED

--- Comment #1 from Eric Gallager <egallager at gcc dot gnu.org> ---
gcc now prints this warning for the testcase:

$ /usr/local/bin/gcc -c -Wc++-compat 41027.c
41027.c: In function ‘h’:
41027.c:10:11: warning: uninitialized const member in ‘struct f’ is invalid in
C++ [-Wc++-compat]
  struct f h;
           ^
41027.c:3:12: note: ‘a’ should be initialized
  const int a;
            ^

So apparently this was fixed somewhere along the way.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]