<p dir="ltr">It's probably too rate to matter, but would it be worth introducing a LLVM_MEMBER_ATTRIBUTE_UNUSED or similar for this use that's only non empty when building with llvm?</p>
<div class="gmail_quote">On Apr 16, 2014 4:13 AM, "Chandler Carruth" <<a href="mailto:chandlerc@gmail.com">chandlerc@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Author: chandlerc<br>
Date: Wed Apr 16 06:04:33 2014<br>
New Revision: 206373<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=206373&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=206373&view=rev</a><br>
Log:<br>
Hopefully avoid a warning on some GCCs (but not all strangely,<br>
preventing me from seeing it initially). GCC doesn't use the unused<br>
attribute on members for anything, so while it works to suppress Clang's<br>
warning for an unused private member, it adds a GCC warning for the<br>
attribute. =/ Silence Clang's warning with a void cast in the<br>
constructor instead which doesn't trigger any complaints from GCC.<br>
<br>
Modified:<br>
    cfe/trunk/include/clang/Basic/SourceManager.h<br>
<br>
Modified: cfe/trunk/include/clang/Basic/SourceManager.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/SourceManager.h?rev=206373&r1=206372&r2=206373&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/SourceManager.h?rev=206373&r1=206372&r2=206373&view=diff</a><br>

==============================================================================<br>
--- cfe/trunk/include/clang/Basic/SourceManager.h (original)<br>
+++ cfe/trunk/include/clang/Basic/SourceManager.h Wed Apr 16 06:04:33 2014<br>
@@ -97,7 +97,7 @@ namespace SrcMgr {<br>
     // important. It is quite awkward to fit this aligner into any other part<br>
     // of the class due to the lack of portable ways to combine it with other<br>
     // members.<br>
-    llvm::AlignedCharArray<8, 1> NonceAligner LLVM_ATTRIBUTE_UNUSED;<br>
+    llvm::AlignedCharArray<8, 1> NonceAligner;<br>
<br>
     /// \brief The actual buffer containing the characters from the input<br>
     /// file.<br>
@@ -146,7 +146,9 @@ namespace SrcMgr {<br>
     ContentCache(const FileEntry *Ent = 0)<br>
       : Buffer(0, false), OrigEntry(Ent), ContentsEntry(Ent),<br>
         SourceLineCache(0), NumLines(0), BufferOverridden(false),<br>
-        IsSystemFile(false) {}<br>
+        IsSystemFile(false) {<br>
+      (void)NonceAligner; // Silence warnings about unused member.<br>
+    }<br>
<br>
     ContentCache(const FileEntry *Ent, const FileEntry *contentEnt)<br>
       : Buffer(0, false), OrigEntry(Ent), ContentsEntry(contentEnt),<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div>