This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Should GCC emit the same code for compilation with '-g' and without '-g'
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Chengnian Sun <chengniansun at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 1 May 2018 21:57:59 +0200
- Subject: Re: Should GCC emit the same code for compilation with '-g' and without '-g'
- References: <CAFcs27m-U2uwVxKvy9+V9EJTK2jap2n8SdGQv7zP6vBn06BDzw@mail.gmail.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, May 01, 2018 at 12:53:45PM -0700, Chengnian Sun wrote:
> Does gcc have a requirement about the impact of emitting debug info on the
> generated code? Should the code be the same no matter whether '-g' is
> specified?
Yes (except for selective scheduling, but that warns if you combine
-fselecting-scheduling{,2} together with -fvar-tracking-assignments
and disables the latter by default).
Jakub