public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58126] New: No diagnostic when inheriting an uninitialized const or reference member
@ 2013-08-11 15:38 vvnic.holas at gmail dot com
  2013-10-06 16:00 ` [Bug c++/58126] " redi at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: vvnic.holas at gmail dot com @ 2013-08-11 15:38 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58126

            Bug ID: 58126
           Summary: No diagnostic when inheriting an uninitialized const
                    or reference member
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vvnic.holas at gmail dot com

The following code compiles without any warning or error:

struct A {
    const int value1;
    int& value2;
};

struct B : A {};

int main() {
    B b; // no error
//    A a; // error, as expected
}


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

* [Bug c++/58126] No diagnostic when inheriting an uninitialized const or reference member
  2013-08-11 15:38 [Bug c++/58126] New: No diagnostic when inheriting an uninitialized const or reference member vvnic.holas at gmail dot com
@ 2013-10-06 16:00 ` redi at gcc dot gnu.org
  2013-10-06 17:54 ` paolo.carlini at oracle dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: redi at gcc dot gnu.org @ 2013-10-06 16:00 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58126

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-10-06
     Ever confirmed|0                           |1


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

* [Bug c++/58126] No diagnostic when inheriting an uninitialized const or reference member
  2013-08-11 15:38 [Bug c++/58126] New: No diagnostic when inheriting an uninitialized const or reference member vvnic.holas at gmail dot com
  2013-10-06 16:00 ` [Bug c++/58126] " redi at gcc dot gnu.org
@ 2013-10-06 17:54 ` paolo.carlini at oracle dot com
  2013-10-06 21:41 ` paolo at gcc dot gnu.org
  2013-10-06 21:42 ` paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-10-06 17:54 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58126

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |paolo.carlini at oracle dot com

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Mine.


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

* [Bug c++/58126] No diagnostic when inheriting an uninitialized const or reference member
  2013-08-11 15:38 [Bug c++/58126] New: No diagnostic when inheriting an uninitialized const or reference member vvnic.holas at gmail dot com
  2013-10-06 16:00 ` [Bug c++/58126] " redi at gcc dot gnu.org
  2013-10-06 17:54 ` paolo.carlini at oracle dot com
@ 2013-10-06 21:41 ` paolo at gcc dot gnu.org
  2013-10-06 21:42 ` paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: paolo at gcc dot gnu.org @ 2013-10-06 21:41 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58126

--- Comment #2 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Sun Oct  6 21:41:19 2013
New Revision: 203232

URL: http://gcc.gnu.org/viewcvs?rev=203232&root=gcc&view=rev
Log:
/cp
2013-10-06  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/58126
    * class.c (check_bases): Propagate CLASSTYPE_READONLY_FIELDS_NEED_INIT
    and CLASSTYPE_REF_FIELDS_NEED_INIT from bases to derived.
    * init.c (diagnose_uninitialized_cst_or_ref_member_1): Extend error
    messages about uninitialized const and references members to mention
    the base class.

/testsuite
2013-10-06  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/58126
    * g++.dg/init/uninitialized1.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/init/uninitialized1.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/class.c
    trunk/gcc/cp/init.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/58126] No diagnostic when inheriting an uninitialized const or reference member
  2013-08-11 15:38 [Bug c++/58126] New: No diagnostic when inheriting an uninitialized const or reference member vvnic.holas at gmail dot com
                   ` (2 preceding siblings ...)
  2013-10-06 21:41 ` paolo at gcc dot gnu.org
@ 2013-10-06 21:42 ` paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-10-06 21:42 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58126

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
           Assignee|paolo.carlini at oracle dot com    |unassigned at gcc dot gnu.org
   Target Milestone|---                         |4.9.0

--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Fixed for 4.9.0.


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

end of thread, other threads:[~2013-10-06 21:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-11 15:38 [Bug c++/58126] New: No diagnostic when inheriting an uninitialized const or reference member vvnic.holas at gmail dot com
2013-10-06 16:00 ` [Bug c++/58126] " redi at gcc dot gnu.org
2013-10-06 17:54 ` paolo.carlini at oracle dot com
2013-10-06 21:41 ` paolo at gcc dot gnu.org
2013-10-06 21:42 ` paolo.carlini at oracle dot com

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