]> granicus.if.org Git - clang/commit
Gracefully (and correctly) handle init of multiple union members
authorMatthew Curtis <mcurtis@codeaurora.org>
Thu, 3 Oct 2013 12:14:24 +0000 (12:14 +0000)
committerMatthew Curtis <mcurtis@codeaurora.org>
Thu, 3 Oct 2013 12:14:24 +0000 (12:14 +0000)
commit4e49952712ff9b1b1696cb07580b2b24a3ca99e1
tree1fe3fd445e8be93463a398860c55165293c3fa28
parent618c28547a7f7cc785a6c6301f79febf5a584f9e
Gracefully (and correctly) handle init of multiple union members

We now emit warnings when doing so and code generation is consistent
with GCC. Note that the C99 spec is unclear as to the precise
behavior.

See also ...
Bug:
  http://llvm.org/bugs/show_bug.cgi?id=16644 and

cfe-dev discussion:
  http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-September/031918.html

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191890 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/Expr.h
lib/Sema/SemaInit.cpp
test/CodeGen/designated-initializers.c
test/Sema/designated-initializers.c