https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118554
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2025-01-19 Ever confirmed|0 |1 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- That is not a bad idea. Note for inlining, GCC does have already the inline keyword which allows to ignore the computed size when it comes to inlining and consider the inline-asm as 0. > 4) Currently, even the size of an empty asm like __asm("" : "+r" (var)) is > too pessimistic. That already is handled by the inline keyword. so `__asm inline("" : "+r" (var));` Yes it is documented: https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Size-of-an-asm.html The inline keyword was added in GCC 9 though not documented on the changes page.