<html>
<head>
<base href="https://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_ASSIGNED "
title="ASSIGNED --- - Too much information printed in macro diagnostic message"
href="https://llvm.org/bugs/show_bug.cgi?id=24424">24424</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Too much information printed in macro diagnostic message
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>ASSIGNED
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Frontend
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>zhengkai@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, rtrieu@google.com
</td>
</tr>
<tr>
<th>Blocks</th>
<td>24423
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>#define F(x) x + 1
#define NO_INITIATION(x) int a = F(x) * 2
NO_INITIATION(a);
Should print:
reduced-diags-macros.cpp:7:15: warning: variable 'a' is uninitialized when used
within its own initialization [-Wuninitialized]
NO_INITIATION(a);
~~~~~~~~~~~~~~^~
reduced-diags-macros.cpp:4:37: note: expanded from macro 'NO_INITIATION'
#define NO_INITIATION(x) int a = FF(x) * 2
^
Acually print:
reduced-diags-macros.cpp:7:15: warning: variable 'a' is uninitialized when used
within its own initialization [-Wuninitialized]
NO_INITIATION(a);
~~~~~~~~~~~~~~^~
reduced-diags-macros.cpp:4:37: note: expanded from macro 'NO_INITIATION'
#define NO_INITIATION(x) int a = FF(x) * 2
^
reduced-diags-macros.cpp:3:15: note: expanded from macro 'FF'
#define FF(x) x + 1
^
The last macro expansion should not be printed.</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>