https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111243

            Bug ID: 111243
           Summary: The -Og option inlines functions, making for a poor
                    debugging experience.
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: amohr at amohr dot org
  Target Milestone: ---

The docs recommend using -Og for debug builds, but that option inlines
functions which makes single-stepping in debuggers difficult/impossible. 
Adding -fno-inline fixes it.

The docs for -Og say that it disables -finline-functions-called-once. Should
-Og also do -fno-inline?

Here's a small example showing the difference between plain '-Og' and '-Og
-fno-inline':

https://godbolt.org/z/evs73cPT1

Reply via email to