<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - Fixed-Point works poorly with octal/integer literals."
href="https://bugs.llvm.org/show_bug.cgi?id=38161">38161</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Fixed-Point works poorly with octal/integer literals.
</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>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>erich.keane@intel.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Perhaps this needs to be 2 different bugs, but I've discovered 2 different
issues having to do with integers and fixed-point literals.
First, integer overflow is never reported! I can do: 999999999999999999r, and
not get "error: this value is too large for this fixed point type". The value
emitted is always just int16-max.
Secondly, and most importantly, this asserts when using octal literals. Simply
doing:
auto a = 0r;
causes an assert in LiteralSupport in at least 2 places (LiteralSupport.cpp:737
and 1049). Either we need to error on trying to do fixed point octal literals,
or just support them.</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>