Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
b99933c7
Commit
b99933c7
authored
Sep 02, 1992
by
Richard Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(lang_options): Add terminating zero.
From-SVN: r2024
parent
4f77a31b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
133 additions
and
12 deletions
+133
-12
gcc/toplev.c
+133
-12
No files found.
gcc/toplev.c
View file @
b99933c7
...
@@ -495,6 +495,125 @@ struct { char *string; int *variable; int on_value;} f_options[] =
...
@@ -495,6 +495,125 @@ struct { char *string; int *variable; int on_value;} f_options[] =
{
"verbose-asm"
,
&
flag_verbose_asm
,
1
},
{
"verbose-asm"
,
&
flag_verbose_asm
,
1
},
{
"gnu-linker"
,
&
flag_gnu_linker
,
1
}
{
"gnu-linker"
,
&
flag_gnu_linker
,
1
}
};
};
/* Table of language-specific options. */
char
*
lang_options
[]
=
{
"-ftraditional"
,
"-traditional"
,
"-fnotraditional"
,
"-fno-traditional"
,
"-fsigned-char"
,
"-funsigned-char"
,
"-fno-signed-char"
,
"-fno-unsigned-char"
,
"-fsigned-bitfields"
,
"-funsigned-bitfields"
,
"-fno-signed-bitfields"
,
"-fno-unsigned-bitfields"
,
"-fshort-enums"
,
"-fno-short-enums"
,
"-fcond-mismatch"
,
"-fno-cond-mismatch"
,
"-fshort-double"
,
"-fno-short-double"
,
"-fasm"
,
"-fno-asm"
,
"-fbuiltin"
,
"-fno-builtin"
,
"-fno-ident"
,
"-fident"
,
"-ansi"
,
"-Wimplicit"
,
"-Wno-implicit"
,
"-Wwrite-strings"
,
"-Wno-write-strings"
,
"-Wcast-qual"
,
"-Wno-cast-qual"
,
"-Wpointer-arith"
,
"-Wno-pointer-arith"
,
"-Wstrict-prototypes"
,
"-Wno-strict-prototypes"
,
"-Wmissing-prototypes"
,
"-Wno-missing-prototypes"
,
"-Wredundant-decls"
,
"-Wno-redundant-decls"
,
"-Wnested-externs"
,
"-Wno-nested-externs"
,
"-Wtraditional"
,
"-Wno-traditional"
,
"-Wformat"
,
"-Wno-format"
,
"-Wchar-subscripts"
,
"-Wno-char-subscripts"
,
"-Wconversion"
,
"-Wno-conversion"
,
"-Wparentheses"
,
"-Wno-parentheses"
,
"-Wcomment"
,
"-Wno-comment"
,
"-Wcomments"
,
"-Wno-comments"
,
"-Wtrigraphs"
,
"-Wno-trigraphs"
,
"-Wimport"
,
"-Wno-import"
,
"-Wall"
,
/* These are for C++. */
"+e0"
,
"+e1"
,
"+e2"
,
"-fsave-memoized"
,
"-fno-save-memoized"
,
"-fSOS"
,
"-fno-SOS"
,
"-fcadillac"
,
"-fno-cadillac"
,
"-fgc"
,
"-fno-gc"
,
"-flabels-ok"
,
"-fno-labels-ok"
,
"-fstats"
,
"-fno-stats"
,
"-fthis-is-variable"
,
"-fno-this-is-variable"
,
"-fstrict-prototype"
,
"-fno-strict-prototype"
,
"-fall-virtual"
,
"-fno-all-virtual"
,
"-fmemoize-lookups"
,
"-fno-memoize-lookups"
,
"-felide-constructors"
,
"-fno-elide-constructors"
,
"-finline-debug"
,
"-fno-inline-debug"
,
"-fhandle-exceptions"
,
"-fno-handle-exceptions"
,
"-fansi-exceptions"
,
"-fno-ansi-exceptions"
,
"-fspring-exceptions"
,
"-fno-spring-exceptions"
,
"-fdefault-inline"
,
"-fno-default-inline"
,
"-fenum-int-equiv"
,
"-fno-enum-int-equiv"
,
"-fdossier"
,
"-fno-dossier"
,
"-fxref"
,
"-fno-xref"
,
"-fnonnull-objects"
,
"-fno-nonnull-objects"
,
"-Wreturn-type"
,
"-Wno-return-type"
,
"-Woverloaded-virtual"
,
"-Wno-overloaded-virtual"
,
"-Wenum-clash"
,
"-Wno-enum-clash"
,
0
};
/* Options controlling warnings */
/* Options controlling warnings */
...
@@ -2692,7 +2811,18 @@ main (argc, argv, envp)
...
@@ -2692,7 +2811,18 @@ main (argc, argv, envp)
for
(
i
=
1
;
i
<
argc
;
i
++
)
for
(
i
=
1
;
i
<
argc
;
i
++
)
{
{
if
(
argv
[
i
][
0
]
==
'-'
&&
argv
[
i
][
1
]
!=
0
)
int
j
;
/* If this is a language-specific option,
decode it in a language-specific way. */
for
(
j
=
0
;
lang_options
[
j
]
!=
0
;
j
++
)
if
(
!
strncmp
(
argv
[
i
],
lang_options
[
j
],
strlen
(
lang_options
[
j
])))
break
;
if
(
lang_options
[
j
]
!=
0
)
/* If the option is valid for *some* language,
treat it as valid even if this language doesn't understand it. */
lang_decode_option
(
argv
[
i
]);
else
if
(
argv
[
i
][
0
]
==
'-'
&&
argv
[
i
][
1
]
!=
0
)
{
{
register
char
*
str
=
argv
[
i
]
+
1
;
register
char
*
str
=
argv
[
i
]
+
1
;
if
(
str
[
0
]
==
'Y'
)
if
(
str
[
0
]
==
'Y'
)
...
@@ -2784,7 +2914,6 @@ main (argc, argv, envp)
...
@@ -2784,7 +2914,6 @@ main (argc, argv, envp)
}
}
else
if
(
str
[
0
]
==
'f'
)
else
if
(
str
[
0
]
==
'f'
)
{
{
int
j
;
register
char
*
p
=
&
str
[
1
];
register
char
*
p
=
&
str
[
1
];
int
found
=
0
;
int
found
=
0
;
...
@@ -2819,7 +2948,7 @@ main (argc, argv, envp)
...
@@ -2819,7 +2948,7 @@ main (argc, argv, envp)
fix_register
(
&
p
[
10
],
0
,
1
);
fix_register
(
&
p
[
10
],
0
,
1
);
else
if
(
!
strncmp
(
p
,
"call-saved-"
,
11
))
else
if
(
!
strncmp
(
p
,
"call-saved-"
,
11
))
fix_register
(
&
p
[
11
],
0
,
0
);
fix_register
(
&
p
[
11
],
0
,
0
);
else
if
(
!
lang_decode_option
(
argv
[
i
]))
else
error
(
"Invalid option `%s'"
,
argv
[
i
]);
error
(
"Invalid option `%s'"
,
argv
[
i
]);
}
}
else
if
(
str
[
0
]
==
'O'
)
else
if
(
str
[
0
]
==
'O'
)
...
@@ -2836,8 +2965,6 @@ main (argc, argv, envp)
...
@@ -2836,8 +2965,6 @@ main (argc, argv, envp)
pedantic
=
1
;
pedantic
=
1
;
else
if
(
!
strcmp
(
str
,
"pedantic-errors"
))
else
if
(
!
strcmp
(
str
,
"pedantic-errors"
))
flag_pedantic_errors
=
pedantic
=
1
;
flag_pedantic_errors
=
pedantic
=
1
;
else
if
(
lang_decode_option
(
argv
[
i
]))
;
else
if
(
!
strcmp
(
str
,
"quiet"
))
else
if
(
!
strcmp
(
str
,
"quiet"
))
quiet_flag
=
1
;
quiet_flag
=
1
;
else
if
(
!
strcmp
(
str
,
"version"
))
else
if
(
!
strcmp
(
str
,
"version"
))
...
@@ -2851,7 +2978,6 @@ main (argc, argv, envp)
...
@@ -2851,7 +2978,6 @@ main (argc, argv, envp)
}
}
else
if
(
str
[
0
]
==
'W'
)
else
if
(
str
[
0
]
==
'W'
)
{
{
int
j
;
register
char
*
p
=
&
str
[
1
];
register
char
*
p
=
&
str
[
1
];
int
found
=
0
;
int
found
=
0
;
...
@@ -3049,12 +3175,7 @@ You Lose! You must define PREFERRED_DEBUGGING_TYPE!
...
@@ -3049,12 +3175,7 @@ You Lose! You must define PREFERRED_DEBUGGING_TYPE!
error
(
"Invalid option `%s'"
,
argv
[
i
]);
error
(
"Invalid option `%s'"
,
argv
[
i
]);
}
}
else
if
(
argv
[
i
][
0
]
==
'+'
)
else
if
(
argv
[
i
][
0
]
==
'+'
)
{
error
(
"Invalid option `%s'"
,
argv
[
i
]);
if
(
lang_decode_option
(
argv
[
i
]))
;
else
error
(
"Invalid option `%s'"
,
argv
[
i
]);
}
else
else
filename
=
argv
[
i
];
filename
=
argv
[
i
];
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment