<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
It’s certainly *possible* to enable c++ attribute syntax for C99; we’ve done so experimentally in-house. Whether it’s a *good* idea is a whole different question.
<div><br>
</div>
<div>We (some CERT folks, in loose collaboration with DeLesley Hutchins at Google) are working on a concurrency-related static analysis that needs attributes. Our funders would like C (actually C11) support as well as C++ support. If we had attribute support
for C11, our remaining C++ work would suffice to handle all the relevant C issues as well.
<div><br>
</div>
<div>C11-with-C++11-attributes would be a thoroughly non-standard language, of course. However, the particular attributes we’re interested in have no effect whatsoever on code generation or optimization; they’re purely for static analysis.</div>
<div><br>
</div>
<div>It sure would be nice to be able to enable C++11 attribute syntax for some flavor of C, with in-tree support.</div>
<div><br>
</div>
<div>Dean Sutherland</div>
<div><a href="mailto:dsutherland@cert.org">dsutherland@cert.org</a></div>
<div>
<div><br>
</div>
<div>
<div><br>
</div>
<div><br>
<div>
<div>
<div>
<div>On Jan 9, 2014, at 4:54 AM, Renato Golin <<a href="mailto:renato.golin@linaro.org">renato.golin@linaro.org</a>> wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On 8 January 2014 18:41, Arnold Schwaighofer <span dir="ltr">
<<a href="mailto:aschwaighofer@apple.com" target="_blank">aschwaighofer@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb">
<div class="h5"><span style="color:rgb(34,34,34)">Could we enable c++ attribute syntax for c99 (via a command line flag)?</span></div>
</div>
</blockquote>
<div><br>
</div>
<div>Hi Arnold,</div>
<div><br>
</div>
<div>This falls too close to Clang-specific behaviour for my liking... One alternative would be to compile a C99 file in C++11 mode, but you'll end up with different semantics that the original code might not have intended.</div>
<div><br>
</div>
<div>--renato</div>
</div>
<br>
</div>
</div>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>