Skip to content

Commit 15c3a4b

Browse files
committed
Silence gcc on the use of the GNU typeof extension.
The same can be done for different compiler (clang supports the same mechanism as gcc). Signed-off-by: George Bosilca <[email protected]>
1 parent 60e82dd commit 15c3a4b

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

opal/class/opal_fifo.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ static inline opal_list_item_t *opal_fifo_pop_atomic(opal_fifo_t *fifo)
216216
const opal_list_item_t *const ghost = &fifo->opal_fifo_ghost;
217217

218218
# if OPAL_HAVE_ATOMIC_LLSC_PTR
219+
219220
register opal_list_item_t *item, *next;
220221
int attempt = 0, ret = 0;
221222

@@ -228,7 +229,10 @@ static inline opal_list_item_t *opal_fifo_pop_atomic(opal_fifo_t *fifo)
228229
attempt = 0;
229230
}
230231

232+
#pragma GCC diagnostic push
233+
#pragma GCC diagnostic ignored "-Wlanguage-extension-token"
231234
opal_atomic_ll_ptr(&fifo->opal_fifo_head.data.item, item);
235+
#pragma GCC diagnostic pop
232236
if (ghost == item) {
233237
if ((intptr_t) ghost == fifo->opal_fifo_tail.data.item) {
234238
return NULL;

opal/class/opal_lifo.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,9 @@ static inline opal_list_item_t *opal_lifo_push_atomic(opal_lifo_t *lifo, opal_li
213213

214214
# if OPAL_HAVE_ATOMIC_LLSC_PTR
215215

216+
#pragma GCC diagnostic push
217+
#pragma GCC diagnostic ignored "-Wlanguage-extension-token"
218+
216219
/* Retrieve one element from the LIFO. If we reach the ghost element then the LIFO
217220
* is empty so we return NULL.
218221
*/
@@ -244,6 +247,8 @@ static inline opal_list_item_t *opal_lifo_pop_atomic(opal_lifo_t *lifo)
244247
return item;
245248
}
246249

250+
#pragma GCC diagnostic pop
251+
247252
# else
248253

249254
/* Retrieve one element from the LIFO. If we reach the ghost element then the LIFO

0 commit comments

Comments
 (0)