<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">New patch incorporating Eli's feedback.<br>
<br>
Thanks Eli!<br>
<br>
Matthew Curtis<br>
<br>
On 9/24/2013 2:07 PM, Eli Friedman wrote:<br>
</div>
<blockquote
cite="mid:CAJdarcFcVNx6UAwxCfq_aUBz8quuw5UJD7kOv1Efs9azOV3X1A@mail.gmail.com"
type="cite">
<div dir="ltr">On Tue, Sep 24, 2013 at 8:04 AM, Matthew Curtis <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:mcurtis@codeaurora.org" target="_blank">mcurtis@codeaurora.org</a>></span>
wrote:<br>
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">We now emit warnings
when doing so and code generation is consistent<br>
with GCC. Note that the C99 spec is unclear as to the
precise<br>
behavior.<br>
<br>
See also ...<br>
Bug:<br>
<a moz-do-not-send="true"
href="http://llvm.org/bugs/show_bug.cgi?id=16644"
target="_blank">http://llvm.org/bugs/show_bug.cgi?id=16644</a>
and<br>
<br>
cfe-dev discussion:<br>
<a moz-do-not-send="true"
href="http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-September/031918.html"
target="_blank">http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-September/031918.html</a><span
class=""><font color="#888888"><br>
<br>
<br>
</font></span></blockquote>
<br>
+ FieldDecl *CFD =
ArrayFillerOrUnionFieldInit.dyn_cast<FieldDecl *>();<br>
+ assert((FD == 0 || CFD == 0 || CFD == FD)<br>
+ && "Only one field of a union may be
initiazed at a time!");<br>
<br>
This will cause an unused variable warning in release
builds. Also, spelling.<br>
<br>
diff --git a/test/Sema/designated-initializers.c
b/test/Sema/designated-initializers.c<br>
index 36fa559..be365a0 100644<br>
--- a/test/Sema/designated-initializers.c<br>
+++ b/test/Sema/designated-initializers.c<br>
@@ -1,5 +1,8 @@<br>
// RUN: %clang_cc1 -fsyntax-only -verify -triple
x86_64-unknown-unknown %s<br>
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s
-DCHECK_CODEGEN=1 \<br>
+// RUN: -S -emit-llvm -o - 2>&1 | FileCheck %s<br>
<br>
Please put a separate code generation test into
test/CodeGen. It's okay if you duplicate the test code.<br>
<br>
</div>
<div class="gmail_quote">The approach looks fine.<br>
<br>
</div>
<div class="gmail_quote">-Eli<br>
</div>
</div>
</div>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation</pre>
</body>
</html>