This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Linking Program with Lib That Uses -fwrapv or '-fno-strict-overflow'
- From: Jeffrey Walton <noloader at gmail dot com>
- To: GCC Users List <gcc-help at gcc dot gnu dot org>
- Date: Mon, 25 Jul 2011 20:30:36 -0400
- Subject: Linking Program with Lib That Uses -fwrapv or '-fno-strict-overflow'
- Reply-to: noloader at gmail dot com
Hi All,
Is it possible to build a library which specifies -fwrapv or
'-fno-strict-overflow' but does not penalize the final executable
(with respect to optimizations) after final linking?
The question arises from a library which detects wrap/carry/overflow
and might need to specify -fwrapv or '-fno-strict-overflow' to take
advantage of 2s compliment math used on many modern architectures.
Jeff