public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Constify ada-lex.l:attributes
@ 2024-04-02 17:36 Tom Tromey
0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2024-04-02 17:36 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=051889c8104c3c959b903d08e9afbcb7e9670c43
commit 051889c8104c3c959b903d08e9afbcb7e9670c43
Author: Tom Tromey <tromey@adacore.com>
Date: Thu Mar 14 12:25:42 2024 -0600
Constify ada-lex.l:attributes
While examining the Ada parser globals with 'nm', I noticed that the
lexer's "attributes" array should be const. This change moves it into
read-only storage.
Diff:
---
gdb/ada-lex.l | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/ada-lex.l b/gdb/ada-lex.l
index 4e99eaab036..1b1aaf89005 100644
--- a/gdb/ada-lex.l
+++ b/gdb/ada-lex.l
@@ -662,7 +662,7 @@ subseqMatch (const char *subseq, const char *str)
}
-static struct { const char *name; int code; }
+static const struct { const char *name; int code; }
attributes[] = {
{ "address", TICK_ADDRESS },
{ "unchecked_access", TICK_ACCESS },
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-04-02 17:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-02 17:36 [binutils-gdb] Constify ada-lex.l:attributes Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).