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
916269ab
Commit
916269ab
authored
25 years ago
by
Ulrich Drepper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust variable names, comments, help strings to c99.
Recognize options with names *99 as well. From-SVN: r31690
parent
31948547
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
27 deletions
+30
-27
gcc/c-decl.c
+15
-13
gcc/cppinit.c
+15
-14
No files found.
gcc/c-decl.c
View file @
916269ab
...
...
@@ -324,9 +324,9 @@ int flag_no_nonansi_builtin;
int
flag_traditional
;
/* Nonzero means use the ISO C9
x
dialect of C. */
/* Nonzero means use the ISO C9
9
dialect of C. */
int
flag_isoc9
x
=
0
;
int
flag_isoc9
9
=
0
;
/* Nonzero means that we have builtin functions, and main is an int */
...
...
@@ -508,11 +508,11 @@ c_decode_option (argc, argv)
recognize:
-std=iso9899:1990 same as -ansi
-std=iso9899:199409 ISO C as modified in amend. 1
-std=iso9899:199
x ISO C 9x
-std=iso9899:199
9 ISO C 99
-std=c89 same as -std=iso9899:1990
-std=c9
x same as -std=iso9899:199x
-std=c9
9 same as -std=iso9899:1999
-std=gnu89 default, iso9899:1990 + gnu extensions
-std=gnu9
x iso9899:199x
+ gnu extensions
-std=gnu9
9 iso9899:1999
+ gnu extensions
*/
const
char
*
argstart
=
&
p
[
5
];
...
...
@@ -524,7 +524,7 @@ c_decode_option (argc, argv)
flag_writable_strings
=
0
;
flag_no_asm
=
1
;
flag_no_nonansi_builtin
=
1
;
flag_isoc9
x
=
0
;
flag_isoc9
9
=
0
;
}
else
if
(
!
strcmp
(
argstart
,
"iso9899:199409"
))
{
...
...
@@ -532,13 +532,15 @@ c_decode_option (argc, argv)
goto
iso_1990
;
}
else
if
(
!
strcmp
(
argstart
,
"iso9899:199x"
)
||
!
strcmp
(
argstart
,
"c9x"
))
||
!
strcmp
(
argstart
,
"iso9899:1999"
)
||
!
strcmp
(
argstart
,
"c9x"
)
||
!
strcmp
(
argstart
,
"c99"
))
{
flag_traditional
=
0
;
flag_writable_strings
=
0
;
flag_no_asm
=
1
;
flag_no_nonansi_builtin
=
1
;
flag_isoc9
x
=
1
;
flag_isoc9
9
=
1
;
}
else
if
(
!
strcmp
(
argstart
,
"gnu89"
))
{
...
...
@@ -546,15 +548,15 @@ c_decode_option (argc, argv)
flag_writable_strings
=
0
;
flag_no_asm
=
0
;
flag_no_nonansi_builtin
=
0
;
flag_isoc9
x
=
0
;
flag_isoc9
9
=
0
;
}
else
if
(
!
strcmp
(
argstart
,
"gnu9x"
))
else
if
(
!
strcmp
(
argstart
,
"gnu9x"
)
||
!
strcmp
(
argstart
,
"gnu99"
)
)
{
flag_traditional
=
0
;
flag_writable_strings
=
0
;
flag_no_asm
=
0
;
flag_no_nonansi_builtin
=
0
;
flag_isoc9
x
=
1
;
flag_isoc9
9
=
1
;
}
else
error
(
"unknown C standard `%s'"
,
argstart
);
...
...
@@ -3915,12 +3917,12 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
&&
!
(
specbits
&
(
1
<<
(
int
)
RID_TYPEDEF
)
&&
initialized
)
&&
!
in_system_header
)
{
/* Issue a warning if this is an ISO C 9
x
program or if -Wreturn-type
/* Issue a warning if this is an ISO C 9
9
program or if -Wreturn-type
and this is a function, or if -Wimplicit; prefer the former
warning since it is more explicit. */
if
((
warn_implicit_int
||
warn_return_type
)
&&
funcdef_flag
)
warn_about_return_type
=
1
;
else
if
(
warn_implicit_int
||
flag_isoc9
x
)
else
if
(
warn_implicit_int
||
flag_isoc9
9
)
warning
(
"type defaults to `int' in declaration of `%s'"
,
name
);
}
...
...
This diff is collapsed.
Click to expand it.
gcc/cppinit.c
View file @
916269ab
/* CPP Library.
Copyright (C) 1986, 87, 89, 92-98, 1999 Free Software Foundation, Inc.
Copyright (C) 1986, 87, 89, 92-98, 1999
, 2000
Free Software Foundation, Inc.
Contributed by Per Bothner, 1994-95.
Based on CCCP program by Paul Rubin, June 1986
Adapted to ANSI C, Richard Stallman, Jan 1987
...
...
@@ -1310,23 +1310,23 @@ cpp_handle_option (pfile, argc, argv)
case
'l'
:
if
(
!
strcmp
(
argv
[
i
],
"-lang-c"
))
opts
->
cplusplus
=
0
,
opts
->
cplusplus_comments
=
1
,
opts
->
c89
=
0
,
opts
->
c9
x
=
1
,
opts
->
objc
=
0
;
opts
->
c9
9
=
1
,
opts
->
objc
=
0
;
if
(
!
strcmp
(
argv
[
i
],
"-lang-c89"
))
{
opts
->
cplusplus
=
0
,
opts
->
cplusplus_comments
=
0
;
opts
->
c89
=
1
,
opts
->
c9
x
=
0
,
opts
->
objc
=
0
;
opts
->
c89
=
1
,
opts
->
c9
9
=
0
,
opts
->
objc
=
0
;
opts
->
trigraphs
=
1
;
new_pending_define
(
opts
,
"__STRICT_ANSI__"
);
}
if
(
!
strcmp
(
argv
[
i
],
"-lang-c++"
))
opts
->
cplusplus
=
1
,
opts
->
cplusplus_comments
=
1
,
opts
->
c89
=
0
,
opts
->
c9
x
=
0
,
opts
->
objc
=
0
;
opts
->
c9
9
=
0
,
opts
->
objc
=
0
;
if
(
!
strcmp
(
argv
[
i
],
"-lang-objc"
))
opts
->
cplusplus
=
0
,
opts
->
cplusplus_comments
=
1
,
opts
->
c89
=
0
,
opts
->
c9
x
=
0
,
opts
->
objc
=
1
;
opts
->
c9
9
=
0
,
opts
->
objc
=
1
;
if
(
!
strcmp
(
argv
[
i
],
"-lang-objc++"
))
opts
->
cplusplus
=
1
,
opts
->
cplusplus_comments
=
1
,
opts
->
c89
=
0
,
opts
->
c9
x
=
0
,
opts
->
objc
=
1
;
opts
->
c9
9
=
0
,
opts
->
objc
=
1
;
if
(
!
strcmp
(
argv
[
i
],
"-lang-asm"
))
opts
->
lang_asm
=
1
;
if
(
!
strcmp
(
argv
[
i
],
"-lang-fortran"
))
...
...
@@ -1346,26 +1346,27 @@ cpp_handle_option (pfile, argc, argv)
if
(
!
strcmp
(
argv
[
i
],
"-std=gnu89"
))
{
opts
->
cplusplus
=
0
,
opts
->
cplusplus_comments
=
1
;
opts
->
c89
=
1
,
opts
->
c9
x
=
0
,
opts
->
objc
=
0
;
opts
->
c89
=
1
,
opts
->
c9
9
=
0
,
opts
->
objc
=
0
;
}
else
if
(
!
strcmp
(
argv
[
i
],
"-std=gnu9x"
))
else
if
(
!
strcmp
(
argv
[
i
],
"-std=gnu9x"
)
||
!
strcmp
(
argv
[
i
],
"-std=gnu99"
))
{
opts
->
cplusplus
=
0
,
opts
->
cplusplus_comments
=
1
;
opts
->
c89
=
0
,
opts
->
c9
x
=
1
,
opts
->
objc
=
0
;
opts
->
c89
=
0
,
opts
->
c9
9
=
1
,
opts
->
objc
=
0
;
new_pending_define
(
opts
,
"__STDC_VERSION__=199901L"
);
}
else
if
(
!
strcmp
(
argv
[
i
],
"-std=iso9899:1990"
)
||
!
strcmp
(
argv
[
i
],
"-std=c89"
))
{
opts
->
cplusplus
=
0
,
opts
->
cplusplus_comments
=
0
;
opts
->
c89
=
1
,
opts
->
c9
x
=
0
,
opts
->
objc
=
0
;
opts
->
c89
=
1
,
opts
->
c9
9
=
0
,
opts
->
objc
=
0
;
opts
->
trigraphs
=
1
;
new_pending_define
(
opts
,
"__STRICT_ANSI__"
);
}
else
if
(
!
strcmp
(
argv
[
i
],
"-std=iso9899:199409"
))
{
opts
->
cplusplus
=
0
,
opts
->
cplusplus_comments
=
0
;
opts
->
c89
=
1
,
opts
->
c9
x
=
0
,
opts
->
objc
=
0
;
opts
->
c89
=
1
,
opts
->
c9
9
=
0
,
opts
->
objc
=
0
;
opts
->
trigraphs
=
1
;
new_pending_define
(
opts
,
"__STRICT_ANSI__"
);
new_pending_define
(
opts
,
"__STDC_VERSION__=199409L"
);
...
...
@@ -1376,7 +1377,7 @@ cpp_handle_option (pfile, argc, argv)
||
!
strcmp
(
argv
[
i
],
"-std=c99"
))
{
opts
->
cplusplus
=
0
,
opts
->
cplusplus_comments
=
1
;
opts
->
c89
=
0
,
opts
->
c9
x
=
1
,
opts
->
objc
=
0
;
opts
->
c89
=
0
,
opts
->
c9
9
=
1
,
opts
->
objc
=
0
;
opts
->
trigraphs
=
1
;
new_pending_define
(
opts
,
"__STRICT_ANSI__"
);
new_pending_define
(
opts
,
"__STDC_VERSION__=199901L"
);
...
...
@@ -1717,8 +1718,8 @@ Switches:\n\
-lang-fortran Assume that the input sources are in Fortran
\n
\
-lang-chill Assume that the input sources are in Chill
\n
\
-std=<std name> Specify the conformance standard; one of:
\n
\
gnu89, gnu9
x, c89, c9x
, iso9899:1990,
\n
\
iso9899:199409, iso9899:199
x
\n
\
gnu89, gnu9
9, c89, c99
, iso9899:1990,
\n
\
iso9899:199409, iso9899:199
9
\n
\
-+ Allow parsing of C++ style features
\n
\
-w Inhibit warning messages
\n
\
-Wtrigraphs Warn if trigraphs are encountered
\n
\
...
...
This diff is collapsed.
Click to expand it.
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