<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:richard-llvm@metafoo.co.uk" title="Richard Smith <richard-llvm@metafoo.co.uk>"> <span class="fn">Richard Smith</span></a>
</span> changed
<a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - elaborated-enum-base incompatible with NS_ENUM"
href="https://bugs.llvm.org/show_bug.cgi?id=49413">bug 49413</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>RESOLVED
</td>
<td>REOPENED
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>INVALID
</td>
<td>---
</td>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>aaron@aaronballman.com
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - elaborated-enum-base incompatible with NS_ENUM"
href="https://bugs.llvm.org/show_bug.cgi?id=49413#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - elaborated-enum-base incompatible with NS_ENUM"
href="https://bugs.llvm.org/show_bug.cgi?id=49413">bug 49413</a>
from <span class="vcard"><a class="email" href="mailto:richard-llvm@metafoo.co.uk" title="Richard Smith <richard-llvm@metafoo.co.uk>"> <span class="fn">Richard Smith</span></a>
</span></b>
<pre>The error is not produced in -x objective-c nor in -x objective-c++.
The 'enum name : underlying' syntax is not valid at all in C. As a Clang
extension, we permit the C++ language feature in C as well, so the error is
produced in -x c++ and in -x c. Apparently we produce no diagnostic for that
extension by default (for cases that are valid in C++), but all uses of 'enum E
: underlying' are rejected in -x c under -pedantic-errors at least.
Perhaps it would be better if, under -x c, we produced the warning for 'enum
name : underlying' being a Clang extension by default, instead of silently
accepting the invalid code. If we do, then producing a second extension
diagnostic for nesting such an enum in a typedef seems unnecessary and we could
turn that off for C compilations (effectively meaning that the C extension
picks up the Objective-C feature, not the similar-but-more-constraining C++
feature).
Aaron, as our champion of C conformance, what do you think? Silently accepting
this C++ feature in C by default seems at least questionable to me.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>