Should GCC emit the same code for compilation with '-g' and without '-g'

Jakub Jelinek jakub@redhat.com
Tue May 1 19:58:00 GMT 2018


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



More information about the Gcc mailing list