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++/84358] error message (missing call to class contructor): misleading source code location


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 {
      ^

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