From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id yVw5H5PDvmrsWCUAWB0awg (envelope-from ) for ; Thu, 01 Oct 2026 16:33:23 -0400 Received: by simark.ca (Postfix, from userid 112) id 7C02E1E04F; Thu, 01 Oct 2026 16:33:23 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.3 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id DD92F1E047 for ; Thu, 01 Oct 2026 16:33:22 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 82D404BB588F for ; Thu, 1 Oct 2026 20:33:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 82D404BB588F Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 0796A4BB24D1 for ; Thu, 1 Oct 2026 20:31:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0796A4BB24D1 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=efficios.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=efficios.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0796A4BB24D1 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1790886676; cv=none; b=kWE1SHmqnA8MvoqtpHW3UTlYYD1kCDTl2bjmjKdplGdAyN68Gc1jr9gEH1bEwQT4lTnd7OUNkN/zv/L5cVMRxJb344B9L5H2x5kt2E1otOpi8K/WssvkjqSdSoNf7Zjz49elajtBuq4uPKIgjtOEnCy849T67KGP6xrxsP/NTZc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1790886676; c=relaxed/simple; bh=IJA5fNeryRSHrA/x2SeUOAOEqxKQyKlj2s64vZNIi0k=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=nvBlvqHKHhEgOxOqHEWCsXmHRrrmAySgje/b+IPZJc07sNSX9YqTK5f1IO3rE71qhhJgteXBvZL1RClIV2zsKhU0WfCsISCnUbinp2BBcGsK6tXEnkGWYxRlHjQKhWOiXKy1D0xM/jmg3N3L9BAkYX8dcZY5+zI5pBtwsydYDGQ= ARC-Authentication-Results: i=1; sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0796A4BB24D1 Received: by simark.ca (Postfix) id D76481E0BC; Thu, 01 Oct 2026 16:31:13 -0400 (EDT) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 7/7] gdb: make COMPLETE_CHAR a constexpr Date: Thu, 1 Oct 2026 16:30:05 -0400 Message-ID: <20261001203105.1379971-8-simon.marchi@efficios.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261001203105.1379971-1-simon.marchi@efficios.com> References: <20261001203105.1379971-1-simon.marchi@efficios.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org In ada-exp-parser.h, make COMPLETE_CHAR a constexpr rather than a macro. While at it, fix the comment in ada-lex.l that refers to it. It used the wrong name (COMPLETION_CHAR), and the constant is no longer "below", it is now in ada-exp-parser.h. The explanation it points to is now the comment on ada_parse_state::returned_complete. Change-Id: I4ecfec782add66ab658bcb1494b1f78cdd432218 --- gdb/ada-exp-parser.h | 2 +- gdb/ada-lex.l | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gdb/ada-exp-parser.h b/gdb/ada-exp-parser.h index 0f438647437e..09a716e6636c 100644 --- a/gdb/ada-exp-parser.h +++ b/gdb/ada-exp-parser.h @@ -24,7 +24,7 @@ #include "parser-defs.h" /* The character we use to represent the completion point. */ -#define COMPLETE_CHAR '\001' +constexpr char COMPLETE_CHAR = '\001'; namespace ada_exp_parser { diff --git a/gdb/ada-lex.l b/gdb/ada-lex.l index 62edcd251966..857176c4d83d 100644 --- a/gdb/ada-lex.l +++ b/gdb/ada-lex.l @@ -39,8 +39,8 @@ OPER ([-+*/=<>&]|"<="|">="|"**"|"/="|"and"|"or"|"xor"|"not"|"mod"|"rem"|"abs" EXP (e[+-]{NUM10}) POSEXP (e"+"?{NUM10}) -/* This must agree with COMPLETION_CHAR below. See the comment there - for the explanation. */ +/* This must agree with COMPLETE_CHAR in ada-exp-parser.h. See the + comment on ada_parse_state::returned_complete for the explanation. */ COMPLETE "\001" NOT_COMPLETE [^\001] -- 2.55.0