From patchwork Fri May 5 01:50:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luc Van Oostenryck X-Patchwork-Id: 9712939 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5BE3E602B9 for ; Fri, 5 May 2017 01:51:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4DE4E28699 for ; Fri, 5 May 2017 01:51:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 41059286B2; Fri, 5 May 2017 01:51:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D090428699 for ; Fri, 5 May 2017 01:51:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752277AbdEEBv6 (ORCPT ); Thu, 4 May 2017 21:51:58 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:36266 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752030AbdEEBv5 (ORCPT ); Thu, 4 May 2017 21:51:57 -0400 Received: by mail-wm0-f67.google.com with SMTP id u65so6861776wmu.3 for ; Thu, 04 May 2017 18:51:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+dRx+oFF0X2b/+Al2MiNmbEg2xDfrKc+tJj/6laGbas=; b=TN9cmCjr26P2JbizpyoI64+GJabUtKP4Cv4VfjpXrJzlzJ89/fSVhPZpOUWt6bypjQ 2SVEVychmHLd8g/P1UvRepvSkiduWfX8nwyitWksxBD+BEikqSbkImaVJELJMwnRmuLf LFPyIFPqpa2yrSvwT+rPEmcGCs+3XaHPBK+wiyoNaHplKtTwkZ5agqkRgapK1zJprskz bJcLv6xT/Tg9vtHwaBdF7avZRD0HOtRitQaBFALCCy3bAFt5+YBtRQcNe+hQvo6foOUi Xld8ioB7kUyN3HP43kzh1yZmzg4d1UineCbCQT92UsCZjN0QQT6NwrABZsAgAR4b2qn4 a9Zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=+dRx+oFF0X2b/+Al2MiNmbEg2xDfrKc+tJj/6laGbas=; b=nyYBnVELW+kWrNZDo9UTaTJltaSJ7/BdwpV6OZ3y9KlaqPJYzFAdDe8xgUhGnMe1Zo 3zSMcBqAvpvXJMw0cMFSaZZ/wDUBWbZjaCzsJ6u5nhKcnD88ONZy4VuBIaBgNWRlf2RQ 9gGlh8h5En7n11ZcA1nHTFgHUplxWfKmoI9Zi+yiLneKGHY/zVNyY6kG43jVnOjbv92q 09o8S7ume3HIJA29b+Tp+txwtXTumN99xxW1gmafRK1m+Uj4YiK2Ao94M+XZr+PiZJzT j7OyUyd1hO0xcrAUarjS+2s/qyibjj1nHC7TEpC3L9MSNoPVvd2JX+8lIualET+ku2ZA QHiA== X-Gm-Message-State: AODbwcBYu82O+FGjXCnvY5zc05gCPmeMNcYvtowpiD0Z0qICHE/ApDq4 49DSwbatJi+0bns8nCQ= X-Received: by 10.28.96.6 with SMTP id u6mr543817wmb.17.1493949116262; Thu, 04 May 2017 18:51:56 -0700 (PDT) Received: from localhost.localdomain ([2a02:a03f:8f6:2d00:94a4:d690:7d00:af4d]) by smtp.gmail.com with ESMTPSA id e67sm576135wma.9.2017.05.04.18.51.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 May 2017 18:51:55 -0700 (PDT) From: Luc Van Oostenryck To: linux-sparse@vger.kernel.org Cc: Christopher Li , Luc Van Oostenryck Subject: [PATCH 3/6] keyword: explicitly add C99 & C11 keywords Date: Fri, 5 May 2017 03:50:31 +0200 Message-Id: <20170505015034.65164-4-luc.vanoostenryck@gmail.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170505015034.65164-1-luc.vanoostenryck@gmail.com> References: <20170505015034.65164-1-luc.vanoostenryck@gmail.com> Sender: linux-sparse-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Explicitly add the new keywords introduced by C99 & C11 to the file "ident-list.h" and insure that they are marked as reserved (even if not used, so we're future-ready). Signed-off-by: Luc Van Oostenryck --- ident-list.h | 8 ++++++++ validation/reserved.c | 21 ++++++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/ident-list.h b/ident-list.h index dbed06858..709ffce01 100644 --- a/ident-list.h +++ b/ident-list.h @@ -30,10 +30,18 @@ IDENT(static); /* C99 keywords */ IDENT(restrict); IDENT(__restrict); IDENT(__restrict__); +IDENT(_Bool); +IDENT_RESERVED(_Complex); +IDENT_RESERVED(_Imaginary); /* C11 keywords */ +IDENT(_Alignas); IDENT_RESERVED(_Alignof); +IDENT_RESERVED(_Atomic); +IDENT_RESERVED(_Generic); +IDENT(_Noreturn); IDENT_RESERVED(_Static_assert); +IDENT(_Thread_local); /* Special case for L'\t' */ IDENT(L); diff --git a/validation/reserved.c b/validation/reserved.c index 2ca9ac40a..546fd19dd 100644 --- a/validation/reserved.c +++ b/validation/reserved.c @@ -16,7 +16,17 @@ static int (__typeof__); static int (inline); static int (__inline); static int (__inline__); +static int (_Alignas); +static int (_Alignof); +static int (_Atomic); +static int (_Bool); +static int (_Complex); +static int (_Generic); +static int (_Imaginary); +static int (_Noreturn); static int (_Static_assert); +static int (_Thread_local); + /* * check-name: const et.al. are reserved identifiers * check-error-start: @@ -38,6 +48,15 @@ reserved.c:15:12: error: Trying to use reserved word '__typeof__' as identifier reserved.c:16:12: error: Trying to use reserved word 'inline' as identifier reserved.c:17:12: error: Trying to use reserved word '__inline' as identifier reserved.c:18:12: error: Trying to use reserved word '__inline__' as identifier -reserved.c:19:12: error: Trying to use reserved word '_Static_assert' as identifier +reserved.c:19:12: error: Trying to use reserved word '_Alignas' as identifier +reserved.c:20:12: error: Trying to use reserved word '_Alignof' as identifier +reserved.c:21:12: error: Trying to use reserved word '_Atomic' as identifier +reserved.c:22:12: error: Trying to use reserved word '_Bool' as identifier +reserved.c:23:12: error: Trying to use reserved word '_Complex' as identifier +reserved.c:24:12: error: Trying to use reserved word '_Generic' as identifier +reserved.c:25:12: error: Trying to use reserved word '_Imaginary' as identifier +reserved.c:26:12: error: Trying to use reserved word '_Noreturn' as identifier +reserved.c:27:12: error: Trying to use reserved word '_Static_assert' as identifier +reserved.c:28:12: error: Trying to use reserved word '_Thread_local' as identifier * check-error-end: */