https://bugs.llvm.org/show_bug.cgi?id=42583
Bug ID: 42583
Summary: "-cc1as" doesn't supports non absolute preprocessor
expressions
Product: clang
Version: 8.0
Hardware: Other
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Driver
Assignee: unassignedclangb...@nondot.org
Reporter: qwertyt...@gmail.com
CC: llvm-bugs@lists.llvm.org, neeil...@live.com,
richard-l...@metafoo.co.uk
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 :)
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs