[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] QEMU_BUILD_BUG_ON: use __COUNTER__
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH] QEMU_BUILD_BUG_ON: use __COUNTER__ |
Date: |
Tue, 31 Jan 2017 15:02:05 +0000 |
On 31 January 2017 at 14:43, Michael S. Tsirkin <address@hidden> wrote:
> Some headers use QEMU_BUILD_BUG_ON. This causes a problem
> if the C file including that header happens to have
> QEMU_BUILD_BUG_ON at the same line number.
>
> Fix using a widely available extension: __COUNTER__.
> If unavailable, provide a stub.
Specifically, it was introduced in gcc 4.3.0 (2008),
and is in at least clang 3.1 (2012).
thanks
-- PMM
Re: [Qemu-devel] [PATCH] QEMU_BUILD_BUG_ON: use __COUNTER__, Markus Armbruster, 2017/01/31