summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2002-05-14 23:54:46 +0000
committerH. Peter Anvin <hpa@zytor.com>2002-05-14 23:54:46 +0000
commit0a7a3b459cbf908404e3d3d80f15dad6b1c62e79 (patch)
tree3993e942dc865d96a93741f128ebcd88bc049be1
parent310b3e165f86d6655bf68bd89ff9309aa63663f2 (diff)
downloadnasm-0a7a3b459cbf908404e3d3d80f15dad6b1c62e79.tar.gz
Change "const static" -> "static const" to keep gcc happy
-rw-r--r--insns.pl4
-rw-r--r--macros.pl2
-rw-r--r--names.c4
-rw-r--r--nasm.c4
-rw-r--r--nasmlib.c4
-rw-r--r--output/outaout.c2
-rw-r--r--output/outbin.c2
-rw-r--r--output/outcoff.c2
-rw-r--r--output/outelf.c2
-rw-r--r--preproc.c6
10 files changed, 16 insertions, 16 deletions
diff --git a/insns.pl b/insns.pl
index 243f0e83..0d95f285 100644
--- 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 );
diff --git a/macros.pl b/macros.pl
index a0fc97ef..38168cf8 100644
--- 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 391cb012..26fb22eb 100644
--- 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 84f9360b..c0b4d468 100644
--- 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",
diff --git a/nasmlib.c b/nasmlib.c
index a88d88a1..d96a492b 100644
--- 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"
};
diff --git a/output/outaout.c b/output/outaout.c
index 75420f7d..4e61c8a4 100644
--- a/output/outaout.c
+++ b/output/outaout.c
@@ -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",
diff --git a/output/outbin.c b/output/outbin.c
index 058aa0ef..424b4f44 100644
--- a/output/outbin.c
+++ b/output/outbin.c
@@ -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]",
diff --git a/output/outcoff.c b/output/outcoff.c
index f7160d51..935b70dd 100644
--- a/output/outcoff.c
+++ b/output/outcoff.c
@@ -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",
diff --git a/output/outelf.c b/output/outelf.c
index 2013dd46..4518217e 100644
--- a/output/outelf.c
+++ b/output/outelf.c
@@ -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",
diff --git a/preproc.c b/preproc.c
index 9e4850a0..6de1ffbe 100644
--- 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"
};