PING^1

On 11/30/18 11:26 AM, Martin Liška wrote:
> Hi Jason.
> 
> Just small nits I noticed for:
> 
> cat test4.C
> int a, b, c;
> 
> void
> __attribute__((noinline))
> bar()
> {
>   if (a == 123)
>     [[likely]] c = 5;
>   else
>     [[likely]] b = 77;
> }
> 
> int main()
> {
>   bar ();
>   return 0;
> }
> 
> $ g++ test4.C -c
> test4.C: In function ‘void bar()’:
> test4.C:8:16: warning: both branches of ‘if’ statement marked as ‘hot label’ 
> [-Wattributes]
>     8 |     [[likely]] c = 5;
>       |                ^
>     9 |   else
>    10 |     [[likely]] b = 77;
>       |                ~
> 
> 1) I would expect 'likely' instead of 'hot label'
> 2) maybe we can put the carousel to the attribute instead of the first 
> statement in the block?
> 
> Thanks,
> Martin
> 

Reply via email to