This is the mail archive of the gcc@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]

Re: [RFC] Have assert macros


On Aug 24, 2004, at 3:25 PM, Mark Mitchell wrote:
Nathan Sidwell wrote:

Hi,
I did some measurements to determine how much leaving in our self checking
mechanism of the form
if (expr)
abort()
was costing us in compilation speed. I built 4 --disable-checking
compilers, with the following tweaks
0) baseline
1) #define abort to no-op, thus allowing the optimizer can remove the
controlling expression
2) #define abort to no-op and g++'s my_friendly_assert to no-op

Redefining abort is undefined behavior in C89 (4.1.2.1, footnote 91). Of course we can switch to using gcc_abort, appropriately #define'd.


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