[Top][All Lists]

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

Re: Using __builtin_expect (likely/unlikely macros)

From: Paul Eggert
Subject: Re: Using __builtin_expect (likely/unlikely macros)
Date: Thu, 18 Apr 2019 12:32:46 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

On 4/18/19 10:56 AM, Andy Moreton wrote:
> AVOID is a weird name for a
> return type, so where is the return type, and does this even compile ?

Heh. I had the same reaction many years ago when I first saw the EXFUN
macro: where's the return type? AVOID is better than EXFUN in that it
"looks" syntactically correct as a type name, and its unusual name
provides a useful mnemonic (obviously it compiles).

This is just a style issue. We can remove the definition of AVOID and
replace all its uses with "_Noreturn ATTRIBUTE_COLD void", or we can
rename AVOID to some other identifier, or we can define some other macro
with some slightly-different meaning. Although I considered those
alternatives and liked AVOID the best, I can see where other opinions
might differ.

reply via email to

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