sv-benchmarks
sv-benchmarks copied to clipboard
seq-pthread benchmarks have misleading indentation
cs_queue_true-unreach-call.i: In function ‘empty’:
cs_queue_true-unreach-call.i:1048:2: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation]
else
^~~~
cs_queue_true-unreach-call.i:1049:14: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘else’
__CS_cs(); if (__CS_ret != 0) return 0;
^~
cs_queue_true-unreach-call.i: In function ‘full’:
cs_queue_true-unreach-call.i:1064:2: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation]
else
^~~~
cs_queue_true-unreach-call.i:1065:14: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘else’
__CS_cs(); if (__CS_ret != 0) return 0;
^~
cs_queue_true-unreach-call.i: In function ‘dequeue’:
cs_queue_true-unreach-call.i:1106:2: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation]
else
^~~~
cs_queue_true-unreach-call.i:1107:14: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘else’
__CS_cs(); if (__CS_ret != 0) return 0;
^~
.............cs_queue_false-unreach-call.i: In function ‘empty’:
cs_queue_false-unreach-call.i:1028:2: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation]
else
^~~~
cs_queue_false-unreach-call.i:1029:14: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘else’
__CS_cs(); if (__CS_ret != 0) return 0;
^~
.cs_queue_false-unreach-call.i: In function ‘full’:
cs_queue_false-unreach-call.i:1044:2: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation]
else
^~~~
cs_queue_false-unreach-call.i:1045:14: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘else’
__CS_cs(); if (__CS_ret != 0) return 0;
^~
cs_queue_false-unreach-call.i: In function ‘dequeue’:
cs_queue_false-unreach-call.i:1086:2: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation]
else
^~~~
cs_queue_false-unreach-call.i:1087:14: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘else’
__CS_cs(); if (__CS_ret != 0) return 0;
@mikhailramalho That benchmark appears to have been submitted by Omar; is there any original source to it? Indeed the code:
if (q->head == 20)
{
__CS_cs(); if (__CS_ret != 0) return 0;
q->head = 1;
__CS_cs(); if (__CS_ret != 0) return 0;
}
else
__CS_cs(); if (__CS_ret != 0) return 0;
q->head++;
__CS_cs(); if (__CS_ret != 0) return 0;
looks like it might be missing a pair of { } as presumably q->head++
was the original else
block.
Indeed it looks wrong. It was definitely preprocessed by cseq (not sure which variant).
@trucnguyenlam care to join the thread? Do you guys have the original source?