summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorDaniel Clarke <dan137clarke@gmail.com>2022-07-13 22:55:33 +1000
committerGitHub <noreply@github.com>2022-07-13 20:55:33 +0800
commit489f6ddfefc4993af97eb2884b6d8173a4ee8b9d (patch)
treeb06d5e17a633d54f4eed813eb3ccaa732800f77f /compiler
parentaf140966ea5b58ea248459acb74bf84537deb423 (diff)
downloadNim-489f6ddfefc4993af97eb2884b6d8173a4ee8b9d.tar.gz
fix #20012 (#20013)
* replace gcc asm with __asm__ and add a test

* update test case to specify gcc or clang and not cpp

Co-authored-by: daniel <danielclarke@wearepopgun.com>
Diffstat (limited to 'compiler')
-rw-r--r--compiler/extccomp.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/extccomp.nim b/compiler/extccomp.nim
index f1dc01f44..23c43cb67 100644
--- a/compiler/extccomp.nim
+++ b/compiler/extccomp.nim
@@ -86,7 +86,7 @@ compiler gcc:
     linkLibCmd: " -l$1",
     debug: "",
     pic: "-fPIC",
-    asmStmtFrmt: "asm($1);$n",
+    asmStmtFrmt: "__asm__($1);$n",
     structStmtFmt: "$1 $3 $2 ", # struct|union [packed] $name
     produceAsm: gnuAsmListing,
     cppXsupport: "-std=gnu++14 -funsigned-char",