Re: GCC 6 -Wnonnull is too aggressive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 17, 2016 at 11:14:29AM -0600, Michael Catanzaro wrote:
> El mié, 17-02-2016 a las 17:53 +0100, Jakub Jelinek escribió:
> > That is wrong.  Even older gcc versions would just optimize away the
> > assertion.
> 
> Even in -O0 builds?

Probably not, though the warning will be at -O0 too.

> We've been hesitantly removing ASSERT(this) statements from WebKit to

ASSERT(this) is pointless, it is testing if undefined behavior didn't happen
after the fact, that is just too late.  As I said, use -fsanitize=undefined
to make sure you don't call methods on nullptr.

	Jakub
--
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
http://lists.fedoraproject.org/admin/lists/devel@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux