http://llvm.org/bugs/show_bug.cgi?id=8373

           Summary: diagnose use of base member before base is initialized
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]


Created an attachment (id=5616)
 --> (http://llvm.org/bugs/attachment.cgi?id=5616)
full program testcase

The attached testcase is a fully executable version of this snippet:

  struct Base {
    explicit Base(int) { }
    int member_;
  };
  struct Derived : public Base {
    Derived() : Base(member_) { }
  };

I think there should be a warning on use of member_ in Derived because it
hasn't been initialized yet. None of clang, gcc nor EDG warn on this.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to