www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 23435] New: Add Flag To Disable All Inlining

https://issues.dlang.org/show_bug.cgi?id=23435

          Issue ID: 23435
           Summary: Add Flag To Disable All Inlining
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: jack jackstouffer.com

I use `pragma(inline, true)` all over my code. And by default, DMD inlines
these functions even in debug builds, which normally is great.

What sucks about this is that stepping through the code in a debugger is way
worse because the the "step-over" operation no longer works properly when
trying to step over an inlined function call. Maybe this is a bug in the PDB
output, but what happens is the inlined function call still takes you into the
inlined function body as if you were using step-in. step-over essentially
becomes useless for these function calls.

Please add a flag

-inline=false

to hard disable all inlining in the compiler.

--
Oct 24 2022