<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 - "-cc1as" doesn't supports non absolute preprocessor expressions"
href="https://bugs.llvm.org/show_bug.cgi?id=42583">42583</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>"-cc1as" doesn't supports non absolute preprocessor expressions
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>8.0
</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>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Driver
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>qwertytmp1@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>It is not possible to compile following assembly source code:
```
#define OPERATION_ADD 0
#define OPERATION_SUB 1
.macro EXECUTE operation
.if \operation == OPERATION_ADD
add x0, x1, #1
.endif
.if \operation == OPERATION_SUB
sub x0, x1, #1
.endif
.endm
EXECUTE OPERATION_ADD
```
Clang reports following error:
```
/opt/toolchains/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-16.04/bin/aarch64-funnyos-gnueabi-clang
-c preprocessor_arm.s
<instantiation>:2:5: error: expected absolute expression
.if OPERATION_SUB == OPERATION_ADD
^
preprocessor_arm.s:16:1: note: while in macro instantiation
EXECUTE OPERATION_SUB
^
<instantiation>:6:5: error: expected absolute expression
.if OPERATION_SUB == OPERATION_SUB
^
preprocessor_arm.s:16:1: note: while in macro instantiation
EXECUTE OPERATION_SUB
^
```
P.S. aarch64-funnyos-gnueabi-clang is a symlink to clang.
P.S. As I frequently wrote before: "It compiles by GCC".
P.P.S. LLVM is a future :)</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>