[Bug c++/84358] error message (missing call to class contructor): misleading source code location

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Feb 13 11:11:00 GMT 2018


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2018-02-13
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.  clang reports

t.C:13:5: error: constructor for 'B' must explicitly initialize the member 'a'
      which does not have a default constructor
    B() : b(1) {}...
    ^
t.C:10:7: note: member is declared here
    A a...
      ^
t.C:1:7: note: 'A' declared here
class A {
      ^


More information about the Gcc-bugs mailing list