Change "const static" -> "static const" to keep gcc happy
This commit is contained in:
parent
310b3e165f
commit
0a7a3b459c
10 changed files with 16 additions and 16 deletions
4
insns.pl
4
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 );
|
||||
|
|
|
@ -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";
|
||||
|
|
4
names.c
4
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"
|
||||
|
|
4
nasm.c
4
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",
|
||||
|
|
|
@ -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"
|
||||
};
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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]",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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"
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue