GNU bug report logs - #75335
cppi: Support C23 #elifdef and #elifndef

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: cppi; Reported by: Collin Funk <collinfunk38@HIDDEN>; dated Sat, 4 Jan 2025 02:49:01 UTC; Maintainer for cppi is bug-cppi@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 4 Jan 2025 06:47:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 04 01:47:35 2025
Received: from localhost ([127.0.0.1]:53118 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tTxwd-0006FU-9F
	for submit <at> debbugs.gnu.org; Sat, 04 Jan 2025 01:47:35 -0500
Received: from lists.gnu.org ([2001:470:142::17]:49858)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <meyering@HIDDEN>)
 id 1tTxwa-0006FB-PU
 for submit <at> debbugs.gnu.org; Sat, 04 Jan 2025 01:47:34 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <meyering@HIDDEN>)
 id 1tTxwU-00076a-H5
 for bug-cppi@HIDDEN; Sat, 04 Jan 2025 01:47:26 -0500
Received: from mail-pj1-f41.google.com ([209.85.216.41])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <meyering@HIDDEN>)
 id 1tTxwS-0000sX-Nh
 for bug-cppi@HIDDEN; Sat, 04 Jan 2025 01:47:26 -0500
Received: by mail-pj1-f41.google.com with SMTP id
 98e67ed59e1d1-2ef8c012913so14033965a91.3
 for <bug-cppi@HIDDEN>; Fri, 03 Jan 2025 22:47:24 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1735973243; x=1736578043;
 h=content-transfer-encoding:cc:to:subject:message-id:date:from
 :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=5t6yDfYaeSvI6vX9ugvCK+PTt1Hs8NDIGOKGoIRQ1/M=;
 b=JRxRjgXRhNSOx33bliRV3H0e7R4AMofmALTR/uA4zfsgu8YVWPDGWiqz4TITMuW5CX
 JQ31ca8RMZFRg/Nj9otFjF0qFJDDRJ695djeIPFN6jPrR0/72f8SToJ65ukON4XVwOGs
 JVo9cR19J1n0Xq4ztTtWTneYcy4wbiE9bTPRwQSPVBhTb0bG8XjGZaGbQztuBpGJhKw0
 SeqKL9zUzQT6S93wirlgkF8RJd0sODHE8OuGkA+YdVQDvJApdYN+sY/NrRKUPH3sgc6a
 ZBkTVu5cO0E2fKPC8uGEAQexAReNYrIX8EryAQ8bL490ENPO4XpoRCzn0pzqRmAoPk09
 PXVw==
X-Gm-Message-State: AOJu0Yzvbh3qTzc+UsIxXByidClKHBulGocvYbCyrnMklhU3k5GL6shK
 om3Bi8e5K3gXQhw9ninoEBrFTUYyEKJ8NpN7dzJwxBKbqt+yCAJiyGBspH+tNRsUTYHLljEzsWc
 dFi2Vd7HcwQUWC4cqaExOTMF64eV+QA==
X-Gm-Gg: ASbGnctw3MF1Ad2e8pV0gISqStbndFm3EOjWd2k+XJXPzhPpHWaZGYwcKVJBWAtzbbX
 tKVfDwQlG0lUBxXo3S3whW+yh6izKj8R2yS8bjw==
X-Google-Smtp-Source: AGHT+IFwjbuVLeyv/365EvzDlxTHPoK2EwnJh1v059mK3ZtByiO9/aDn0q50E1EEzbzPIjaZW2sKG8g9TwKZM7TyuhQ=
X-Received: by 2002:a17:90b:2b86:b0:2ee:9d57:243 with SMTP id
 98e67ed59e1d1-2f452dea390mr73089705a91.1.1735973243024; Fri, 03 Jan 2025
 22:47:23 -0800 (PST)
MIME-Version: 1.0
References: <87r05ji9b6.fsf@HIDDEN>
In-Reply-To: <87r05ji9b6.fsf@HIDDEN>
From: Jim Meyering <jim@HIDDEN>
Date: Fri, 3 Jan 2025 22:47:10 -0800
Message-ID: <CA+8g5KG-bamjND9EuHZfq0f=S_o=54GoQK4YOyS+S=Aq2Jt_ng@HIDDEN>
Subject: Re: cppi: Support C23 #elifdef and #elifndef
To: Collin Funk <collinfunk38@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Received-SPF: pass client-ip=209.85.216.41; envelope-from=meyering@HIDDEN;
 helo=mail-pj1-f41.google.com
X-Spam_score_int: -16
X-Spam_score: -1.7
X-Spam_bar: -
X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9,
 FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001,
 HEADER_FROM_DIFFERENT_DOMAINS=0.204, RCVD_IN_DNSWL_NONE=-0.0001,
 RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001,
 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.2 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  On Fri, Jan 3, 2025 at 6:48 PM Collin Funk <collinfunk38@HIDDEN>
    wrote: > Hi Jim, > > C23 added #elifdef and #elifndef. I've attached a patch
    to have cppi > recognize them. Hi Collin, thank you. That looked perfect,
    so I pushed it as-is. 
 
 Content analysis details:   (1.2 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
                             provider (meyering[at]gmail.com)
  1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
  0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level
                             mail domains are different
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [2001:470:142:0:0:0:0:17 listed in]
                             [list.dnswl.org]
  0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and
                             EnvelopeFrom freemail headers are
                             different
X-Debbugs-Envelope-To: submit
Cc: bug-cppi@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.2 (/)

On Fri, Jan 3, 2025 at 6:48=E2=80=AFPM Collin Funk <collinfunk38@HIDDEN>=
 wrote:
> Hi Jim,
>
> C23 added #elifdef and #elifndef. I've attached a patch to have cppi
> recognize them.

Hi Collin, thank you. That looked perfect, so I pushed it as-is.

The size of this change is borderline, but ok for a first contribution
with no copyright on file.
If you make a future change to cppi, please submit the usual copyright
assignment.




Information forwarded to bug-cppi@HIDDEN:
bug#75335; Package cppi. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 4 Jan 2025 02:48:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 03 21:48:15 2025
Received: from localhost ([127.0.0.1]:52839 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tTuD1-0003JQ-6b
	for submit <at> debbugs.gnu.org; Fri, 03 Jan 2025 21:48:15 -0500
Received: from lists.gnu.org ([2001:470:142::17]:43548)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <collinfunk38@HIDDEN>)
 id 1tTuCv-0003J9-Af
 for submit <at> debbugs.gnu.org; Fri, 03 Jan 2025 21:48:13 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <collinfunk38@HIDDEN>)
 id 1tTuCp-0001NZ-B5
 for bug-cppi@HIDDEN; Fri, 03 Jan 2025 21:48:03 -0500
Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <collinfunk38@HIDDEN>)
 id 1tTuCn-0002BD-I6
 for bug-cppi@HIDDEN; Fri, 03 Jan 2025 21:48:03 -0500
Received: by mail-pj1-x102e.google.com with SMTP id
 98e67ed59e1d1-2efded08c79so14230698a91.0
 for <bug-cppi@HIDDEN>; Fri, 03 Jan 2025 18:48:00 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1735958879; x=1736563679; darn=gnu.org;
 h=mime-version:user-agent:message-id:date:subject:to:from:from:to:cc
 :subject:date:message-id:reply-to;
 bh=DnsxwPNpgP2ZhW7ocGa1tZRQxEMQb9NSGIr3pvrIwKI=;
 b=BO3Mewo4uGVSg+MHGP3Wy/b+dAiXKc0evPwNU1N1nEp4YVV8ktTP7V/M6W0xjeXquI
 0hBeYXtCc3ncB854iKuCbiuJPnoyXTAwlQerwSpu6/pF67flLg5oBO5hifKY4z0MhRN1
 C/zue58ogtcO3pxOiJjx1DHML22GBCFkhcObRDvFYDw1+6sgUlb4mdTJ99zm5sYK3DCH
 tk1pnTR6fatwkqVH0FxBKa748rREsAlHYmJlCzYioRhLbNOUcJGbw4/l9gZGpkdHyNAv
 dqSBKb22lx4dxyRuuBHoxdiW/EdxqDJXOK48Vq68hFkXmrlq+Ft7V9Q38B1SJUa5dGal
 KU3g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1735958879; x=1736563679;
 h=mime-version:user-agent:message-id:date:subject:to:from
 :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=DnsxwPNpgP2ZhW7ocGa1tZRQxEMQb9NSGIr3pvrIwKI=;
 b=VGAwJ8jPrRHjlpyBT5shqKLZFdnSfOerYFVDGvfwN0LFX0Xfenk6guQuKVf8Lim/Rc
 +jV0y75PDts4oPojdjDq2fOynxhKIeFTGulHj6GTAgzdlllDxijr1AiUYfDMs2bVxgwK
 QhfW2w55don5KG2DI5xdvkV38R+5O/SpfqJ05AE+xIOoCIYdcGCgU8vbWqCZn1CLfCBH
 7A55GuB4cyVlj55Iet+Ae+WVEXeDUNVyNDSalb2n7Yo9JDCthkfuLTPmHDK2dCFixYZo
 GNjcWIWttk4o03xrBRfVn/WZxe1biS0C8o8TPhctj31vds9RegMe7jNy/tDdSixlpkPu
 IRIw==
X-Gm-Message-State: AOJu0YzG5ODvik4pdq+vviI9pSudt7OUZ317N6JnGGm45WcCu+q9UAF7
 23HrNFBBNVrCB7ynN4WWqnK5qzEET7jhtl2baEz4Y3zCkUu4Ons9kH55iQ==
X-Gm-Gg: ASbGnctlXrUR+gQlwElo8CxIkk7tyq+lZAXWkOlo6OD7KH9bEM0ilJ+S873v9KGiaSu
 vDxjNAdJeHC3CUo2tZfEj5OKsUhQMFWR6BNeMjIWjNPybK/sJfhRwmbUgVbPoby+uOFdGtEGBBH
 qa58DSuGXFoJYvDm4M0HtOaByIjPYdqC7M7NeGxcia83zyMR8F4lqcGmsKsdE0JNZPgRgpv704S
 CRlHlI6jqbt93dr48pC/h53l7T1UAI5kUXAL2hYk5wQzcOFbag+Q6tzOw2kCG50q7MgCPzCSbr3
 uonb4mtydw==
X-Google-Smtp-Source: AGHT+IGcS+lvngUG299GuQl/5kkFzQ/Sy4eVIOpq11uUiz9A/ameN9cNHulMS1zZvGQS8UC67E8ddA==
X-Received: by 2002:a17:90b:2f45:b0:2ea:aa56:499 with SMTP id
 98e67ed59e1d1-2f452dee49fmr75646248a91.1.1735958879137; 
 Fri, 03 Jan 2025 18:47:59 -0800 (PST)
Received: from fedora (c-73-93-224-2.hsd1.ca.comcast.net. [73.93.224.2])
 by smtp.gmail.com with ESMTPSA id
 d9443c01a7336-219dc7ec98asm253709865ad.0.2025.01.03.18.47.58
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 03 Jan 2025 18:47:58 -0800 (PST)
From: Collin Funk <collinfunk38@HIDDEN>
To: bug-cppi@HIDDEN, Jim Meyering <jim@HIDDEN>
Subject: cppi: Support C23 #elifdef and #elifndef
Date: Fri, 03 Jan 2025 18:47:57 -0800
Message-ID: <87r05ji9b6.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Received-SPF: pass client-ip=2607:f8b0:4864:20::102e;
 envelope-from=collinfunk38@HIDDEN; helo=mail-pj1-x102e.google.com
X-Spam_score_int: -17
X-Spam_score: -1.8
X-Spam_bar: -
X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.2 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  Hi Jim, C23 added #elifdef and #elifndef. I've attached a
 patch to have cppi recognize them. Collin 
 Content analysis details:   (1.2 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [2001:470:142:0:0:0:0:17 listed in] [list.dnswl.org]
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (collinfunk38[at]gmail.com)
 1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends
 in digit (collinfunk38[at]gmail.com)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.2 (/)

--=-=-=
Content-Type: text/plain

Hi Jim,

C23 added #elifdef and #elifndef. I've attached a patch to have cppi
recognize them.

Collin


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0001-cppi-Support-C23-elifdef-and-elifndef.patch

From 02d7a219c9adaa159d5eec4ea011892859da1eb1 Mon Sep 17 00:00:00 2001
From: Collin Funk <collin.funk1@HIDDEN>
Date: Fri, 3 Jan 2025 18:38:09 -0800
Subject: [PATCH] cppi: Support C23 #elifdef and #elifndef

* src/cpp.gp: Add EIC_ELIFDEF and EIC_ELIFNDEF.
* src/cppi.l (emit_indented_cpp, [^a-zA-Z_\n]): Check for EIC_ELIFDEF
and EIC_ELIFNDEF.
* tests/e10: New file.
* tests/e11: New file.
* tests/f10: New file.
* tests/f11: New file.
* tests/local.mk (TESTS): Add the new tests.
* NEWS: Mention the change.
---
 NEWS           |  3 +++
 src/cpp.gp     |  2 ++
 src/cppi.l     |  5 ++++-
 tests/e10      | 19 +++++++++++++++++++
 tests/e11      | 19 +++++++++++++++++++
 tests/f10      | 25 +++++++++++++++++++++++++
 tests/f11      | 21 +++++++++++++++++++++
 tests/local.mk |  4 ++++
 8 files changed, 97 insertions(+), 1 deletion(-)
 create mode 100755 tests/e10
 create mode 100755 tests/e11
 create mode 100755 tests/f10
 create mode 100755 tests/f11

diff --git a/NEWS b/NEWS
index 68ecb03..a600801 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,9 @@ GNU cppi NEWS                                               -*- outline -*-
 
 * Noteworthy changes in release ?.? (????-??-??) [?]
 
+** Improvements
+
+  cppi now supports the #elifdef and #elifndef directives added by C23.
 
 * Noteworthy changes in release 1.18 (2013-03-16) [stable]
 
diff --git a/src/cpp.gp b/src/cpp.gp
index 4841aa7..ca865cf 100644
--- a/src/cpp.gp
+++ b/src/cpp.gp
@@ -5,6 +5,8 @@ if, EIC_IF
 ifdef, EIC_IFDEF
 ifndef, EIC_IFNDEF
 elif, EIC_ELIF
+elifdef, EIC_ELIFDEF
+elifndef, EIC_ELIFNDEF
 else, EIC_ELSE
 endif, EIC_ENDIF
 define, EIC_DEFINE
diff --git a/src/cppi.l b/src/cppi.l
index b8dba99..f393be4 100644
--- a/src/cppi.l
+++ b/src/cppi.l
@@ -297,6 +297,8 @@ emit_indented_cpp (char const *in_file, unsigned int line_number,
 
     case EIC_ELSE:
     case EIC_ELIF:
+    case EIC_ELIFDEF:
+    case EIC_ELIFNDEF:
       if (i_depth <= initial_i_depth)
         {
           if (!list_files_only)
@@ -477,7 +479,8 @@ b [^a-zA-Z_\n]
 
   t = emit_indented_cpp (in_file, lineno, yytext, yyleng, &fail);
 
-  if (t == EIC_IF || t == EIC_IFNDEF || t == EIC_ELIF || t == EIC_DEFINE)
+  if (t == EIC_IF || t == EIC_IFNDEF || t == EIC_ELIF || t == EIC_ELIFDEF
+      || t == EIC_ELIFNDEF || t == EIC_DEFINE)
     {
       int c;
       if (inhibit_output)
diff --git a/tests/e10 b/tests/e10
new file mode 100755
index 0000000..679c6c3
--- /dev/null
+++ b/tests/e10
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+t=`basename $0`
+
+cat > $t.I <<\EOF
+#elifdef(FOO)
+EOF
+
+cat > $t.EO <<\EOF
+#elifdef (FOO)
+EOF
+
+cat > $t.Ee <<\EOF
+cppi: standard input: line 1: found #elifdef without matching #if
+EOF
+
+expected_status=2
+
+. $top_srcdir/tests/test-common
diff --git a/tests/e11 b/tests/e11
new file mode 100755
index 0000000..1399e01
--- /dev/null
+++ b/tests/e11
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+t=`basename $0`
+
+cat > $t.I <<\EOF
+#elifndef(FOO)
+EOF
+
+cat > $t.EO <<\EOF
+#elifndef (FOO)
+EOF
+
+cat > $t.Ee <<\EOF
+cppi: standard input: line 1: found #elifndef without matching #if
+EOF
+
+expected_status=2
+
+. $top_srcdir/tests/test-common
diff --git a/tests/f10 b/tests/f10
new file mode 100755
index 0000000..9c7e0d0
--- /dev/null
+++ b/tests/f10
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+t=`basename $0`
+
+cat > $t.I <<\EOF
+#if(FOO)
+#elifdef(NO_BLANK_AFTER_ELIF)
+#error
+#endif
+EOF
+
+cat > $t.EO <<\EOF
+#if (FOO)
+#elifdef (NO_BLANK_AFTER_ELIF)
+# error
+#endif
+EOF
+
+cat > $t.Ee <<\EOF
+EOF
+
+options=
+expected_status=0
+
+. $top_srcdir/tests/test-common
diff --git a/tests/f11 b/tests/f11
new file mode 100755
index 0000000..bcd8042
--- /dev/null
+++ b/tests/f11
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+t=`basename $0`
+
+cat > $t.I <<\EOF
+#if (FOO)
+#elifndef (NO_BLANK_AFTER_ELIF)
+# undef FOOBAR
+#endif
+EOF
+
+cat > $t.EO <<\EOF
+EOF
+
+cat > $t.Ee <<\EOF
+EOF
+
+options=-c
+expected_status=0
+
+. $top_srcdir/tests/test-common
diff --git a/tests/local.mk b/tests/local.mk
index e227e7b..94ecd90 100644
--- a/tests/local.mk
+++ b/tests/local.mk
@@ -16,6 +16,8 @@ TESTS = \
   tests/e7	\
   tests/e8	\
   tests/e9	\
+  tests/e10	\
+  tests/e11	\
   tests/f1	\
   tests/f2	\
   tests/f3	\
@@ -24,6 +26,8 @@ TESTS = \
   tests/f7	\
   tests/f8	\
   tests/f9	\
+  tests/f10	\
+  tests/f11	\
   tests/stringify-1	\
   tests/stringify-2	\
   tests/stringify-3	\
-- 
2.47.1


--=-=-=--




Acknowledgement sent to Collin Funk <collinfunk38@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-cppi@HIDDEN. Full text available.
Report forwarded to bug-cppi@HIDDEN:
bug#75335; Package cppi. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 12 Jan 2025 05:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.