]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Constify ada-lex.l:attributes
authorTom Tromey <tromey@adacore.com>
Thu, 14 Mar 2024 18:25:42 +0000 (12:25 -0600)
committerTom Tromey <tromey@adacore.com>
Tue, 2 Apr 2024 17:24:27 +0000 (11:24 -0600)
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.

gdb/ada-lex.l

index 4e99eaab036ccccf10f226210b365d50c1d14975..1b1aaf8900531ec8f23e9290b0be3a2d885d749a 100644 (file)
@@ -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 },