This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/86586] [6/7/8/9 Regression] -Wsign-compare affects code generation


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

--- Comment #7 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
Another possible compromise is to add 'bool for_warnings = false' argument to
maybe_constant_value, store it along with the reduced tree in cv_cache (perhaps
even by setting a flag on the tree itself?), and then when retrieving from
cv_cache when !for_warnings, but the retrieved tree has the flag set, throw it
away and recompute.

That should be a fairly simple change that keeps the current speed when the
warnings are disabled or main code generation needs the reduced tree before
some of the warnings do.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]