Change "const static" -> "static const" to keep gcc happy
authorH. Peter Anvin <hpa@zytor.com>
Tue, 14 May 2002 23:54:46 +0000 (23:54 +0000)
committerH. Peter Anvin <hpa@zytor.com>
Tue, 14 May 2002 23:54:46 +0000 (23:54 +0000)
insns.pl
macros.pl
names.c
nasm.c
nasmlib.c
output/outaout.c
output/outbin.c
output/outcoff.c
output/outelf.c
preproc.c

index 243f0e8..0d95f28 100644 (file)
--- a/insns.pl
+++ b/insns.pl
@@ -164,7 +164,7 @@ if ( !defined($output) || $output eq 'n' ) {
         " - don't edit it */\n\n";
     print N "/* This file in included by names.c */\n\n";
     
-    print N "const static char *insn_names[] = {";
+    print N "static const char *insn_names[] = {";
     $first = 1;
     foreach $i (@opcodes) {
        print N "," if ( !$first );
@@ -175,7 +175,7 @@ if ( !defined($output) || $output eq 'n' ) {
     }
     print N "\n};\n\n";
     print N "/* Conditional instructions */\n";
-    print N "const static char *icn[] = {";
+    print N "static const char *icn[] = {";
     $first = 1;
     foreach $i (@opcodes_cc) {
        print N "," if ( !$first );
index a0fc97e..38168cf 100644 (file)
--- a/macros.pl
+++ b/macros.pl
@@ -19,7 +19,7 @@ undef $tasm_count;
 open OUTPUT,">macros.c" || die "unable to open macros.c\n";
     
 print OUTPUT "/* This file auto-generated from standard.mac by macros.pl" .
-" - don't edit it */\n\n#include <stddef.h>\n\nconst static char *stdmac[] = {\n";
+" - don't edit it */\n\n#include <stddef.h>\n\nstatic const char *stdmac[] = {\n";
     
 foreach $fname ( @ARGV ) {
     open INPUT,$fname || die "unable to open $fname\n";
diff --git a/names.c b/names.c
index 391cb01..26fb22e 100644 (file)
--- a/names.c
+++ b/names.c
@@ -7,7 +7,7 @@
  * distributed in the NASM archive.
  */
 
-const static char *reg_names[] = {            /* register names, as strings */
+static const char *reg_names[] = {            /* register names, as strings */
     "ah", "al", "ax", "bh", "bl", "bp", "bx", "ch", "cl",
     "cr0", "cr2", "cr3", "cr4", "cs", "cx", "dh", "di", "dl", "dr0",
     "dr1", "dr2", "dr3", "dr6", "dr7", "ds", "dx", "eax", "ebp",
@@ -18,7 +18,7 @@ const static char *reg_names[] = {           /* register names, as strings */
     "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7"
 };
 
-const static char *conditions[] = {           /* condition code names */
+static const char *conditions[] = {           /* condition code names */
     "a", "ae", "b", "be", "c", "e", "g", "ge", "l", "le", "na", "nae",
     "nb", "nbe", "nc", "ne", "ng", "nge", "nl", "nle", "no", "np",
     "ns", "nz", "o", "p", "pe", "po", "s", "z"
diff --git a/nasm.c b/nasm.c
index 84f9360..c0b4d46 100644 (file)
--- a/nasm.c
+++ b/nasm.c
@@ -87,7 +87,7 @@ static char suppressed[1+ERR_WARN_MAX] = {
  * The option names for the suppressible warnings. As before, entry
  * zero does nothing.
  */
-const static char *suppressed_names[1+ERR_WARN_MAX] = {
+static const char *suppressed_names[1+ERR_WARN_MAX] = {
     NULL, "macro-params", "macro-selfref", "orphan-labels", "number-overflow",
     "gnu-elf-extensions"
 };
@@ -96,7 +96,7 @@ const static char *suppressed_names[1+ERR_WARN_MAX] = {
  * The explanations for the suppressible warnings. As before, entry
  * zero does nothing.
  */
-const static char *suppressed_what[1+ERR_WARN_MAX] = {
+static const char *suppressed_what[1+ERR_WARN_MAX] = {
     NULL,
     "macro calls with wrong no. of params",
     "cyclic macro self-references",
index a88d88a..d96a492 100644 (file)
--- a/nasmlib.c
+++ b/nasmlib.c
@@ -640,11 +640,11 @@ void saa_fpwrite (struct SAA *s, FILE *fp)
  * by the scanner.
  */
 #include "names.c"
-const static char *special_names[] = {
+static const char *special_names[] = {
     "byte", "dword", "far", "long", "near", "nosplit", "qword",
     "short", "to", "tword", "word"
 };
-const static char *prefix_names[] = {
+static const char *prefix_names[] = {
     "a16", "a32", "lock", "o16", "o32", "rep", "repe", "repne",
     "repnz", "repz", "times"
 };
index 75420f7..4e61c8a 100644 (file)
@@ -875,7 +875,7 @@ static void aout_filename (char *inname, char *outname, efunc error)
     standard_extension (inname, outname, ".o", error);
 }
 
-const static char *aout_stdmac[] = {
+static const char *aout_stdmac[] = {
     "%define __SECT__ [section .text]",
     "%macro __NASM_CDecl__ 1",
     "%endmacro",
index 058aa0e..424b4f4 100644 (file)
@@ -555,7 +555,7 @@ static void bin_filename (char *inname, char *outname, efunc error)
     standard_extension (inname, outname, "", error);
 }
 
-const static char *bin_stdmac[] = {
+static const char *bin_stdmac[] = {
     "%define __SECT__ [section .text]",
     "%imacro org 1+.nolist",
     "[org %1]",
index f7160d5..935b70d 100644 (file)
@@ -721,7 +721,7 @@ static void coff_win32_filename (char *inname, char *outname, efunc error)
     standard_extension (inname, outname, ".obj", error);
 }
 
-const static char *coff_stdmac[] = {
+static const char *coff_stdmac[] = {
     "%define __SECT__ [section .text]",
     "%macro __NASM_CDecl__ 1",
     "%endmacro",
index 2013dd4..4518217 100644 (file)
@@ -1112,7 +1112,7 @@ static void elf_filename (char *inname, char *outname, efunc error)
     standard_extension (inname, outname, ".o", error);
 }
 
-const static char *elf_stdmac[] = {
+static const char *elf_stdmac[] = {
     "%define __SECT__ [section .text]",
     "%macro __NASM_CDecl__ 1",
     "%define $_%1 $%1",
index 9e4850a..6de1ffb 100644 (file)
--- a/preproc.c
+++ b/preproc.c
@@ -254,7 +254,7 @@ enum
  * we treat CXZ and ECXZ as condition codes, albeit non-invertible
  * ones, so we need a different enum...
  */
-const static char *conditions[] = {
+static const char *conditions[] = {
     "a", "ae", "b", "be", "c", "cxz", "e", "ecxz", "g", "ge", "l", "le",
     "na", "nae", "nb", "nbe", "nc", "ne", "ng", "nge", "nl", "nle", "no",
     "np", "ns", "nz", "o", "p", "pe", "po", "s", "z"
@@ -274,7 +274,7 @@ static int inverse_ccs[] = {
 /*
  * Directive names.
  */
-const static char *directives[] = {
+static const char *directives[] = {
     "%arg",
     "%assign", "%clear", "%define", "%elif", "%elifctx", "%elifdef",
     "%elifid", "%elifidn", "%elifidni", "%elifmacro", "%elifnctx", "%elifndef",
@@ -331,7 +331,7 @@ enum
     TM_IFNDEF, TM_INCLUDE, TM_LOCAL
 };
 
-const static char *tasm_directives[] = {
+static const char *tasm_directives[] = {
     "arg", "elif", "else", "endif", "if", "ifdef", "ifdifi",
     "ifndef", "include", "local"
 };