[LLVMbugs] [Bug 7402] Incorrect "initializing multiple members" error, which lacks a SourceLocation

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Aug 24 15:41:09 PDT 2010


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

Matt Beaumont-Gay <matthewbg at google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |matthewbg at google.com
         Resolution|FIXED                       |
         AssignedTo|unassignedclangbugs at nondot. |chandlerc at gmail.com
                   |org                         |

--- Comment #2 from Matt Beaumont-Gay <matthewbg at google.com> 2010-08-24 17:41:09 CDT ---
Here's a testcase which gives this spurious error with a recent build of clang:

struct X {
  union {
    struct {
      int x;
      int y;
    };
    int v[2];
  };
  X(int t) : x(t), y(t) {}
  template <typename T>
  X(const T& t) : x(t), y(t) {}
};

X a(42);  // ok
X b(42.0);  // error: initializing multiple members of anonymous union

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



More information about the llvm-bugs mailing list