Skip to content
This repository has been archived by the owner on Oct 3, 2021. It is now read-only.

seq-pthread benchmarks have misleading indentation #210

Open
delcypher opened this issue Nov 15, 2016 · 2 comments
Open

seq-pthread benchmarks have misleading indentation #210

delcypher opened this issue Nov 15, 2016 · 2 comments

Comments

@delcypher
Copy link
Member

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;
@tautschnig
Copy link
Contributor

@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.

@mikhailramalho
Copy link
Contributor

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

3 participants