emacs-devel
[Top][All Lists]
Advanced

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

Re: attribute warn_unused_result


From: Tom Tromey
Subject: Re: attribute warn_unused_result
Date: Fri, 04 Feb 2011 10:12:22 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Eli> Except that this page says -D_FORTIFY_SOURCE=2 is in effect with -O2
Eli> or higher, but I also see the warning with -O1.  Only -O0 disables it.

I think that page is probably wrong.

In my libc's features.h, I see:

#if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 \
    && defined __OPTIMIZE__ && __OPTIMIZE__ > 0
[...]

__OPTIMIZE__ is set to 1 if any optimization level > 0 is used.  I don't
think headers can distinguish the levels.  It could probably be done in
GCC specs, but I didn't look to see if the Ubuntu change attempts this.

Tom



reply via email to

[Prev in Thread] Current Thread [Next in Thread]