Skip to content

Commit ede7c67

Browse files
committed
Fix build with -std=
When building in strict mode (e.g. -std=c11), compilation of main/debug_gdb_scripts.c fails because asm() is not a standard top level statement. __asm__() however can be reserved by the compiler even in strict mode. Partially fixes GH-21215. IR needs a similar fix (dstogov/ir#128). Closes GH-21226.
1 parent b6495c1 commit ede7c67

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ PHP NEWS
1010
accessing properties on Reflection LazyProxy via isset()). (Arnaud)
1111
. Fixed OSS-Fuzz #478009707 (Borked assign-op/inc/dec on untyped hooked
1212
property backing value). (ilutov)
13+
. Fixed bug GH-21215 (Build fails with -std=). (Arnaud)
1314

1415
- Curl:
1516
. Fixed bug GH-21023 (CURLOPT_XFERINFOFUNCTION crash with a null callback).

main/debug_gdb_scripts.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* See https://sourceware.org/gdb/current/onlinedocs/gdb.html/dotdebug_005fgdb_005fscripts-section.html#dotdebug_005fgdb_005fscripts-section
88
*/
9-
asm(
9+
__asm__(
1010
".pushsection \".debug_gdb_scripts\", \"MS\",%progbits,1\n"
1111
".byte 4 /* Python Text */\n"
1212
".ascii \"gdb.inlined-script\\n\"\n"

scripts/gdb/debug_gdb_scripts_gen.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
*
2828
* See https://sourceware.org/gdb/current/onlinedocs/gdb.html/dotdebug_005fgdb_005fscripts-section.html#dotdebug_005fgdb_005fscripts-section
2929
*/
30-
asm(
30+
__asm__(
3131
".pushsection \".debug_gdb_scripts\", \"MS\",%%progbits,1\n"
3232
".byte 4 /* Python Text */\n"
3333
".ascii \"gdb.inlined-script\\n\"\n"

0 commit comments

Comments
 (0)