<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - -Wunused-macros warns despite line markers"
href="http://llvm.org/bugs/show_bug.cgi?id=15610">15610</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>-Wunused-macros warns despite line markers
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.2
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>l.lunak@suse.cz
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>-Wunused-macros warns about unused macros even if line markers say it is not
actually from the main file:
$ cat a.cpp
#define FOO
# 1 "b.cpp" 1
#define BAR
$ g++ -Wunused-macros a.cpp -c
a.cpp:3:0: warning: macro "FOO" is not used [-Wunused-macros]
$ clang++ -Wunused-macros a.cpp -c
a.cpp:1:9: warning: macro is not used [-Wunused-macros]
#define FOO
^
In file included from a.cpp:2:
b.cpp:1:9: warning: macro is not used [-Wunused-macros]
#define BAR
^
2 warnings generated.
The warning about BAR is unwanted (e.g. in cases the source file comes
preprocessed in some way, such as -frewrite-includes).</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>