]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
make a few variables static
authorTrevor Saunders <tbsaunde+binutils@tbsaunde.org>
Wed, 13 Apr 2016 08:15:10 +0000 (04:15 -0400)
committerTrevor Saunders <tbsaunde+binutils@tbsaunde.org>
Thu, 14 Apr 2016 21:06:26 +0000 (17:06 -0400)
They are only used in one file, so we might as well restrict there scope to
that file, and theoretically this might slightly improve compilers ability to
optimize usage of these variables.

gas/ChangeLog:

2016-04-14  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>

* config/tc-nios2.c (nios2_as_options): Make file static.
* config/tc-ppc.c (toc_reloc_ypes): Likewise.
* config/tc-sparc.c (native_op_table): Likewise.

gas/ChangeLog
gas/config/tc-nios2.c
gas/config/tc-ppc.c
gas/config/tc-sparc.c

index 46fb0fef9f14e945fdc9ac30f00b892031249e1f..7e9e517902d00117abd7ba06bdeee19fb88d26cc 100644 (file)
@@ -1,3 +1,9 @@
+2016-04-14  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
+
+       * config/tc-nios2.c (nios2_as_options): Make file static.
+       * config/tc-ppc.c (toc_reloc_ypes): Likewise.
+       * config/tc-sparc.c (native_op_table): Likewise.
+
 2016-04-14  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
 
        * config/tc-m32c.c (M32C_Macros): Remove.
index bf37ff7fdbaea19f93e94e75d1750927d12160e0..d207758352df93c504f2357f94205e04c01cc9f6 100644 (file)
@@ -98,7 +98,7 @@ typedef enum
 } relax_optionT;
 
 /* Struct contains all assembler options set with .set.  */
-struct
+static struct
 {
   /* .set noat -> noat = 1 allows assembly code to use at without warning
      and macro expansions generate a warning.
index 1d2c57f0293b1debaca194a7cfbe7ec5a6a9c933..8bfdfdc38c2198a0517dc7dedb0073e1241ef7c1 100644 (file)
@@ -207,7 +207,7 @@ ppc_cpu_t sticky = 0;
 unsigned int ppc_abiversion = 0;
 
 /* Flags set on encountering toc relocs.  */
-enum {
+static enum {
   has_large_toc_reloc = 1,
   has_small_toc_reloc = 2
 } toc_reloc_types;
index a51ca1ff4e2696060b2f0178e264bffa14f142fd..b95613109a6acb7e030a66ed79ccb71d8fff3486 100644 (file)
@@ -758,7 +758,7 @@ md_show_usage (FILE *stream)
 }
 \f
 /* Native operand size opcode translation.  */
-struct
+static struct
   {
     const char *name;
     const char *name32;