diff mbox series

glibcextract.py: Place un-assemblable @@@ in a comment

Message ID 20211008014014.800723-1-maskray@google.com
State New
Headers show
Series glibcextract.py: Place un-assemblable @@@ in a comment | expand

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent
dj/TryBot-32bit success Build for i686

Commit Message

Fangrui Song Oct. 8, 2021, 1:40 a.m. UTC
Unlike GCC, Clang passes asm statements and verifies they are valid
instructions/directives. Place the magic @@@ into a comment to avoid
a parse error.
---
 scripts/glibcextract.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Fangrui Song Oct. 15, 2021, 4:29 p.m. UTC | #1
On 2021-10-07, Fangrui Song wrote:
>Unlike GCC, Clang passes asm statements and verifies they are valid
>instructions/directives. Place the magic @@@ into a comment to avoid
>a parse error.
>---
> scripts/glibcextract.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/scripts/glibcextract.py b/scripts/glibcextract.py
>index 752ff6223b..bf49a5e322 100644
>--- a/scripts/glibcextract.py
>+++ b/scripts/glibcextract.py
>@@ -45,7 +45,7 @@ def compute_c_consts(sym_data, cc):
>             continue
>         name = arg[0]
>         value = arg[1]
>-        out_lines.append('asm ("@@@name@@@%s@@@value@@@%%0@@@end@@@" '
>+        out_lines.append('asm ("/* @@@name@@@%s@@@value@@@%%0@@@end@@@ */" '
>                          ': : \"i\" ((long int) (%s)));'
>                          % (name, value))
>     out_lines.append('}')
>-- 
>2.33.0.882.g93a45727a2-goog
>

Ping..
diff mbox series

Patch

diff --git a/scripts/glibcextract.py b/scripts/glibcextract.py
index 752ff6223b..bf49a5e322 100644
--- a/scripts/glibcextract.py
+++ b/scripts/glibcextract.py
@@ -45,7 +45,7 @@  def compute_c_consts(sym_data, cc):
             continue
         name = arg[0]
         value = arg[1]
-        out_lines.append('asm ("@@@name@@@%s@@@value@@@%%0@@@end@@@" '
+        out_lines.append('asm ("/* @@@name@@@%s@@@value@@@%%0@@@end@@@ */" '
                          ': : \"i\" ((long int) (%s)));'
                          % (name, value))
     out_lines.append('}')