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
31948547
Commit
31948547
authored
Jan 29, 2000
by
Ulrich Drepper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust variable names, comments, help strings to c99.
From-SVN: r31689
parent
10b52f46
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
40 deletions
+39
-40
gcc/c-common.c
+5
-5
gcc/c-lex.c
+1
-1
gcc/c-parse.y
+6
-6
gcc/c-tree.h
+2
-2
gcc/cccp.c
+19
-19
gcc/cpplib.h
+6
-7
No files found.
gcc/c-common.c
View file @
31948547
...
...
@@ -271,7 +271,7 @@ declare_function_name ()
declare_hidden_char_array
(
"__FUNCTION__"
,
name
);
declare_hidden_char_array
(
"__PRETTY_FUNCTION__"
,
printable_name
);
/* The ISO C people "of course" couldn't use __FUNCTION__ in the
ISO C 9
x
standard; instead a new variable is invented. */
ISO C 9
9
standard; instead a new variable is invented. */
declare_hidden_char_array
(
"__func__"
,
name
);
}
...
...
@@ -1775,7 +1775,7 @@ check_format_info (info, params)
else
if
(
*
format_chars
==
'Z'
||
*
format_chars
==
'z'
)
{
length_char
=
*
format_chars
++
;
if
(
pedantic
&&
(
length_char
==
'Z'
||
!
flag_isoc9
x
))
if
(
pedantic
&&
(
length_char
==
'Z'
||
!
flag_isoc9
9
))
warning
(
"ANSI C does not support the `%c' length modifier"
,
length_char
);
}
...
...
@@ -1784,13 +1784,13 @@ check_format_info (info, params)
if
(
length_char
==
'l'
&&
*
format_chars
==
'l'
)
{
length_char
=
'q'
,
format_chars
++
;
if
(
pedantic
&&
!
flag_isoc9
x
)
if
(
pedantic
&&
!
flag_isoc9
9
)
warning
(
"ANSI C does not support the `ll' length modifier"
);
}
else
if
(
length_char
==
'h'
&&
*
format_chars
==
'h'
)
{
length_char
=
'H'
,
format_chars
++
;
if
(
pedantic
&&
!
flag_isoc9
x
)
if
(
pedantic
&&
!
flag_isoc9
9
)
warning
(
"ANSI C does not support the `hh' length modifier"
);
}
if
(
*
format_chars
==
'a'
&&
info
->
format_type
==
scanf_format_type
)
...
...
@@ -1820,7 +1820,7 @@ check_format_info (info, params)
/* The a and A formats are C99 extensions. */
if
(
pedantic
&&
info
->
format_type
!=
strftime_format_type
&&
(
format_char
==
'a'
||
format_char
==
'A'
)
&&
!
flag_isoc9
x
)
&&
!
flag_isoc9
9
)
warning
(
"ANSI C does not support the `%c' format"
,
format_char
);
format_chars
++
;
switch
(
info
->
format_type
)
...
...
gcc/c-lex.c
View file @
31948547
...
...
@@ -340,7 +340,7 @@ init_lex ()
UNSET_RESERVED_WORD
(
"iterator"
);
UNSET_RESERVED_WORD
(
"complex"
);
}
else
if
(
!
flag_isoc9
x
)
else
if
(
!
flag_isoc9
9
)
UNSET_RESERVED_WORD
(
"restrict"
);
if
(
flag_no_asm
)
...
...
gcc/c-parse.y
View file @
31948547
...
...
@@ -474,7 +474,7 @@ cast_expr:
tree
type
=
$
2
;
finish_init
();
if
(
pedantic
&&
!
flag_isoc9
x
)
if
(
pedantic
&&
!
flag_isoc9
9
)
pedwarn
(
"ANSI C forbids constructor expressions"
);
if
(
TYPE_NAME
(
type
)
!=
0
)
{
...
...
@@ -1229,8 +1229,8 @@ parm_declarator:
poplevel (0, 0, 0); } */
|
parm_declarator
'['
'*'
']'
%
prec
'.'
{
$$
=
build_nt
(
ARRAY_REF
,
$
1
,
NULL_TREE
);
if
(
!
flag_isoc9
x
)
error
(
"`[*]' in parameter declaration only allowed in ISO C 9
x
"
);
if
(
!
flag_isoc9
9
)
error
(
"`[*]' in parameter declaration only allowed in ISO C 9
9
"
);
}
|
parm_declarator
'['
expr
']'
%
prec
'.'
{
$$
=
build_nt
(
ARRAY_REF
,
$
1
,
$
3
);
}
...
...
@@ -1263,8 +1263,8 @@ notype_declarator:
{
$$
=
make_pointer_declarator
(
$
2
,
$
3
);
}
|
notype_declarator
'['
'*'
']'
%
prec
'.'
{
$$
=
build_nt
(
ARRAY_REF
,
$
1
,
NULL_TREE
);
if
(
!
flag_isoc9
x
)
error
(
"`[*]' in parameter declaration only allowed in ISO C 9
x
"
);
if
(
!
flag_isoc9
9
)
error
(
"`[*]' in parameter declaration only allowed in ISO C 9
9
"
);
}
|
notype_declarator
'['
expr
']'
%
prec
'.'
{
$$
=
build_nt
(
ARRAY_REF
,
$
1
,
$
3
);
}
...
...
@@ -1346,7 +1346,7 @@ maybecomma:
maybecomma_warn
:
/* empty */
|
','
{
if
(
pedantic
&&
!
flag_isoc9
x
)
{
if
(
pedantic
&&
!
flag_isoc9
9
)
pedwarn
(
"comma at end of enumerator list"
);
}
;
...
...
gcc/c-tree.h
View file @
31948547
...
...
@@ -403,9 +403,9 @@ extern int warn_main;
extern
int
flag_traditional
;
/* Nonzero means use the ISO C9
x
dialect of C. */
/* Nonzero means use the ISO C9
9
dialect of C. */
extern
int
flag_isoc9
x
;
extern
int
flag_isoc9
9
;
/* Nonzero means to allow single precision math even if we're generally
being traditional. */
...
...
gcc/cccp.c
View file @
31948547
...
...
@@ -256,9 +256,9 @@ int traditional;
int
c89
;
/* Nonzero for the 199
x
C Standard. */
/* Nonzero for the 199
9
C Standard. */
int
c9
x
;
int
c9
9
;
/* Nonzero causes output not to be done,
but directives such as #define that have side effects
...
...
@@ -581,7 +581,7 @@ static char rest_extension[] = "...";
#define REST_EXTENSION_LENGTH (sizeof (rest_extension) - 1)
/* This is the implicit parameter name when using variable number of
parameters for macros using the ISO C 9
x
extension. */
parameters for macros using the ISO C 9
9
extension. */
static
char
va_args_name
[]
=
"__VA_ARGS__"
;
#define VA_ARGS_NAME_LENGTH (sizeof (va_args_name) - 1)
...
...
@@ -1128,8 +1128,8 @@ print_help ()
printf
(
" -lang-fortran Assume that the input sources are in Fortran
\n
"
);
printf
(
" -lang-chill Assume that the input sources are in Chill
\n
"
);
printf
(
" -std=<std name> Specify the conformance standard; one of:
\n
"
);
printf
(
" gnu89, gnu9
x, c89, c9x
, iso9899:1990,
\n
"
);
printf
(
" iso9899:199409, iso9899:199
x
\n
"
);
printf
(
" gnu89, gnu9
9, c89, c99
, iso9899:1990,
\n
"
);
printf
(
" iso9899:199409, iso9899:199
9
\n
"
);
printf
(
" -+ Allow parsing of C++ style features
\n
"
);
printf
(
" -w Inhibit warning messages
\n
"
);
printf
(
" -Wtrigraphs Warn if trigraphs are encountered
\n
"
);
...
...
@@ -1445,19 +1445,19 @@ main (argc, argv)
case
'l'
:
if
(
!
strcmp
(
argv
[
i
],
"-lang-c"
))
cplusplus
=
0
,
cplusplus_comments
=
1
,
c89
=
0
,
c9
x
=
1
,
objc
=
0
;
cplusplus
=
0
,
cplusplus_comments
=
1
,
c89
=
0
,
c9
9
=
1
,
objc
=
0
;
else
if
(
!
strcmp
(
argv
[
i
],
"-lang-c89"
))
{
cplusplus
=
0
,
cplusplus_comments
=
0
,
c89
=
1
,
c9
x
=
0
,
objc
=
0
;
cplusplus
=
0
,
cplusplus_comments
=
0
,
c89
=
1
,
c9
9
=
0
,
objc
=
0
;
no_trigraphs
=
0
;
pend_defs
[
2
*
i
]
=
"__STRICT_ANSI__"
;
}
else
if
(
!
strcmp
(
argv
[
i
],
"-lang-c++"
))
cplusplus
=
1
,
cplusplus_comments
=
1
,
c89
=
0
,
c9
x
=
0
,
objc
=
0
;
cplusplus
=
1
,
cplusplus_comments
=
1
,
c89
=
0
,
c9
9
=
0
,
objc
=
0
;
else
if
(
!
strcmp
(
argv
[
i
],
"-lang-objc"
))
cplusplus
=
0
,
cplusplus_comments
=
1
,
c89
=
0
,
c9
x
=
0
,
objc
=
1
;
cplusplus
=
0
,
cplusplus_comments
=
1
,
c89
=
0
,
c9
9
=
0
,
objc
=
1
;
else
if
(
!
strcmp
(
argv
[
i
],
"-lang-objc++"
))
cplusplus
=
1
,
cplusplus_comments
=
1
,
c89
=
0
,
c9
x
=
0
,
objc
=
1
;
cplusplus
=
1
,
cplusplus_comments
=
1
,
c89
=
0
,
c9
9
=
0
,
objc
=
1
;
else
if
(
!
strcmp
(
argv
[
i
],
"-lang-asm"
))
lang_asm
=
1
;
else
if
(
!
strcmp
(
argv
[
i
],
"-lang-fortran"
))
...
...
@@ -1473,24 +1473,24 @@ main (argc, argv)
case
's'
:
if
(
!
strcmp
(
argv
[
i
],
"-std=gnu89"
))
{
cplusplus
=
0
,
cplusplus_comments
=
0
,
c89
=
1
,
c9
x
=
0
,
objc
=
0
;
cplusplus
=
0
,
cplusplus_comments
=
0
,
c89
=
1
,
c9
9
=
0
,
objc
=
0
;
}
else
if
(
!
strcmp
(
argv
[
i
],
"-std=gnu9x"
)
||
!
strcmp
(
argv
[
i
],
"-std=gnu99"
))
{
cplusplus
=
0
,
cplusplus_comments
=
1
,
c89
=
0
,
c9
x
=
1
,
objc
=
0
;
cplusplus
=
0
,
cplusplus_comments
=
1
,
c89
=
0
,
c9
9
=
1
,
objc
=
0
;
pend_defs
[
2
*
i
+
1
]
=
"__STDC_VERSION__=199901L"
;
}
else
if
(
!
strcmp
(
argv
[
i
],
"-std=iso9899:1990"
)
||
!
strcmp
(
argv
[
i
],
"-std=c89"
))
{
cplusplus
=
0
,
cplusplus_comments
=
0
,
c89
=
1
,
c9
x
=
0
,
objc
=
0
;
cplusplus
=
0
,
cplusplus_comments
=
0
,
c89
=
1
,
c9
9
=
0
,
objc
=
0
;
no_trigraphs
=
0
;
pend_defs
[
2
*
i
]
=
"__STRICT_ANSI__"
;
}
else
if
(
!
strcmp
(
argv
[
i
],
"-std=iso9899:199409"
))
{
cplusplus
=
0
,
cplusplus_comments
=
0
,
c89
=
1
,
c9
x
=
0
,
objc
=
0
;
cplusplus
=
0
,
cplusplus_comments
=
0
,
c89
=
1
,
c9
9
=
0
,
objc
=
0
;
no_trigraphs
=
0
;
pend_defs
[
2
*
i
]
=
"__STRICT_ANSI__"
;
pend_defs
[
2
*
i
+
1
]
=
"__STDC_VERSION__=199409L"
;
...
...
@@ -1500,7 +1500,7 @@ main (argc, argv)
||
!
strcmp
(
argv
[
i
],
"-std=c9x"
)
||
!
strcmp
(
argv
[
i
],
"-std=c99"
))
{
cplusplus
=
0
,
cplusplus_comments
=
1
,
c89
=
0
,
c9
x
=
1
,
objc
=
0
;
cplusplus
=
0
,
cplusplus_comments
=
1
,
c89
=
0
,
c9
9
=
1
,
objc
=
0
;
no_trigraphs
=
0
;
pend_defs
[
2
*
i
]
=
"__STRICT_ANSI__"
;
pend_defs
[
2
*
i
+
1
]
=
"__STDC_VERSION__=199901L"
;
...
...
@@ -5845,10 +5845,10 @@ create_definition (buf, limit, op)
if
(
!
is_idstart
[
*
bp
])
{
if
(
c9
x
&&
limit
-
bp
>
(
long
)
REST_EXTENSION_LENGTH
if
(
c9
9
&&
limit
-
bp
>
(
long
)
REST_EXTENSION_LENGTH
&&
bcmp
(
rest_extension
,
bp
,
REST_EXTENSION_LENGTH
)
==
0
)
{
/* This is the ISO C 9
x
way to write macros with variable
/* This is the ISO C 9
9
way to write macros with variable
number of arguments. */
rest_args
=
1
;
temp
->
rest_args
=
1
;
...
...
@@ -5872,7 +5872,7 @@ create_definition (buf, limit, op)
}
if
(
bp
==
temp
->
name
&&
rest_args
==
1
)
{
/* This is the ISO C 9
x
style. */
/* This is the ISO C 9
9
style. */
temp
->
name
=
(
U_CHAR
*
)
va_args_name
;
temp
->
length
=
VA_ARGS_NAME_LENGTH
;
}
...
...
@@ -5891,7 +5891,7 @@ create_definition (buf, limit, op)
SKIP_WHITE_SPACE
(
bp
);
/* A comma at this point can only be followed by an identifier. */
if
(
!
is_idstart
[
*
bp
]
&&
!
(
c9
x
&&
limit
-
bp
>
(
long
)
REST_EXTENSION_LENGTH
&&
!
(
c9
9
&&
limit
-
bp
>
(
long
)
REST_EXTENSION_LENGTH
&&
bcmp
(
rest_extension
,
bp
,
REST_EXTENSION_LENGTH
)
==
0
))
{
error
(
"badly punctuated parameter list in `#define'"
);
goto
nope
;
...
...
gcc/cpplib.h
View file @
31948547
...
...
@@ -114,7 +114,7 @@ struct cpp_buffer
parse_underflow_t
underflow
;
parse_cleanup_t
cleanup
;
void
*
data
;
/* Value of if_stack at start of this file.
Used to prohibit unmatched #endif (etc) in an include file. */
struct
if_stack
*
if_stack
;
...
...
@@ -185,7 +185,7 @@ struct cpp_reader
/* Hash table of macros and assertions. See cpphash.c */
#define HASHSIZE 1403
struct
hashnode
**
hashtab
;
/* Hash table of other included files. See cppfiles.c */
#define ALL_INCLUDE_HASHSIZE 71
struct
include_hash
*
all_include_files
[
ALL_INCLUDE_HASHSIZE
];
...
...
@@ -465,9 +465,9 @@ struct cpp_options {
/* Nonzero for the 1989 C Standard, including corrigenda and amendments. */
char
c89
;
/* Nonzero for the 199
x
C Standard, including corrigenda and amendments. */
char
c9
x
;
/* Nonzero for the 199
9
C Standard, including corrigenda and amendments. */
char
c9
9
;
/* Nonzero means give all the error messages the ANSI standard requires. */
char
pedantic
;
...
...
@@ -801,9 +801,8 @@ extern struct include_hash *include_hash PARAMS ((cpp_reader *, const char *, in
#define INCLUDE_LEN_FUDGE 0
#endif
#ifdef __cplusplus
}
#endif
#endif
/* __GCC_CPPLIB__ */
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