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
6645c3fa
Commit
6645c3fa
authored
Aug 10, 2000
by
Kazu Hirata
Committed by
Jeff Law
Aug 10, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* c-decl.c: Fix formatting.
From-SVN: r35608
parent
7da92c08
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
74 additions
and
52 deletions
+74
-52
gcc/ChangeLog
+4
-0
gcc/c-decl.c
+70
-52
No files found.
gcc/ChangeLog
View file @
6645c3fa
2000-08-10 Kazu Hirata <kazu@hxi.com>
* c-decl.c: Fix formatting.
2000-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2000-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* c-lex.c (parse_float, yylex): For -Wtraditional, issue a
* c-lex.c (parse_float, yylex): For -Wtraditional, issue a
...
...
gcc/c-decl.c
View file @
6645c3fa
...
@@ -19,7 +19,6 @@ along with GNU CC; see the file COPYING. If not, write to
...
@@ -19,7 +19,6 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
Boston, MA 02111-1307, USA. */
/* Process declarations and symbol lookup for C front end.
/* Process declarations and symbol lookup for C front end.
Also constructs types; the standard scalar types at initialization,
Also constructs types; the standard scalar types at initialization,
and structure, union, array and enum types when they are declared. */
and structure, union, array and enum types when they are declared. */
...
@@ -865,8 +864,7 @@ finish_incomplete_decl (decl)
...
@@ -865,8 +864,7 @@ finish_incomplete_decl (decl)
/* Create a new `struct binding_level'. */
/* Create a new `struct binding_level'. */
static
static
struct
binding_level
*
struct
binding_level
*
make_binding_level
()
make_binding_level
()
{
{
/* NOSTRICT */
/* NOSTRICT */
...
@@ -1207,8 +1205,7 @@ poplevel (keep, reverse, functionbody)
...
@@ -1207,8 +1205,7 @@ poplevel (keep, reverse, functionbody)
cases, the TYPE_CONTEXTs of the relevant tagged type nodes get set
cases, the TYPE_CONTEXTs of the relevant tagged type nodes get set
in `grokdeclarator' as soon as we have created the FUNCTION_TYPE
in `grokdeclarator' as soon as we have created the FUNCTION_TYPE
node which will represent the "scope" for these "parameter list local"
node which will represent the "scope" for these "parameter list local"
tagged types.
tagged types. */
*/
if
(
functionbody
)
if
(
functionbody
)
for
(
link
=
tags
;
link
;
link
=
TREE_CHAIN
(
link
))
for
(
link
=
tags
;
link
;
link
=
TREE_CHAIN
(
link
))
...
@@ -1705,7 +1702,8 @@ duplicate_decls (newdecl, olddecl, different_binding_level)
...
@@ -1705,7 +1702,8 @@ duplicate_decls (newdecl, olddecl, different_binding_level)
if
(
TYPE_MAIN_VARIANT
(
TREE_VALUE
(
parm
))
==
void_type_node
if
(
TYPE_MAIN_VARIANT
(
TREE_VALUE
(
parm
))
==
void_type_node
||
TYPE_MAIN_VARIANT
(
TREE_VALUE
(
type
))
==
void_type_node
)
||
TYPE_MAIN_VARIANT
(
TREE_VALUE
(
type
))
==
void_type_node
)
{
{
error_with_decl
(
newdecl
,
"prototype for `%s' follows and number of arguments doesn't match"
);
error_with_decl
(
newdecl
,
"prototype for `%s' follows and number of arguments doesn't match"
);
error_with_decl
(
olddecl
,
"non-prototype definition here"
);
error_with_decl
(
olddecl
,
"non-prototype definition here"
);
errmsg
=
1
;
errmsg
=
1
;
break
;
break
;
...
@@ -2379,7 +2377,8 @@ pushdecl (x)
...
@@ -2379,7 +2377,8 @@ pushdecl (x)
}
}
}
}
#if 0 /* This case is probably sometimes the right thing to do. */
#if 0
/* This case is probably sometimes the right thing to do. */
/* If we have a local external declaration,
/* If we have a local external declaration,
then any file-scope declaration should not
then any file-scope declaration should not
have been static. */
have been static. */
...
@@ -2508,9 +2507,11 @@ implicitly_declare (functionid)
...
@@ -2508,9 +2507,11 @@ implicitly_declare (functionid)
/* We used to reuse an old implicit decl here,
/* We used to reuse an old implicit decl here,
but this loses with inline functions because it can clobber
but this loses with inline functions because it can clobber
the saved decl chains. */
the saved decl chains. */
/* if (IDENTIFIER_IMPLICIT_DECL (functionid) != 0)
#if 0
if (IDENTIFIER_IMPLICIT_DECL (functionid) != 0)
decl = IDENTIFIER_IMPLICIT_DECL (functionid);
decl = IDENTIFIER_IMPLICIT_DECL (functionid);
else */
else
#endif
decl
=
build_decl
(
FUNCTION_DECL
,
functionid
,
default_function_type
);
decl
=
build_decl
(
FUNCTION_DECL
,
functionid
,
default_function_type
);
/* Warn of implicit decl following explicit local extern decl.
/* Warn of implicit decl following explicit local extern decl.
...
@@ -2955,7 +2956,9 @@ init_decl_processing ()
...
@@ -2955,7 +2956,9 @@ init_decl_processing ()
named_labels
=
NULL
;
named_labels
=
NULL
;
current_binding_level
=
NULL_BINDING_LEVEL
;
current_binding_level
=
NULL_BINDING_LEVEL
;
free_binding_level
=
NULL_BINDING_LEVEL
;
free_binding_level
=
NULL_BINDING_LEVEL
;
pushlevel
(
0
);
/* make the binding_level structure for global names */
/* Make the binding_level structure for global names. */
pushlevel
(
0
);
global_binding_level
=
current_binding_level
;
global_binding_level
=
current_binding_level
;
build_common_tree_nodes
(
flag_signed_char
);
build_common_tree_nodes
(
flag_signed_char
);
...
@@ -3050,7 +3053,8 @@ init_decl_processing ()
...
@@ -3050,7 +3053,8 @@ init_decl_processing ()
signed_wchar_type_node
=
signed_type
(
wchar_type_node
);
signed_wchar_type_node
=
signed_type
(
wchar_type_node
);
unsigned_wchar_type_node
=
unsigned_type
(
wchar_type_node
);
unsigned_wchar_type_node
=
unsigned_type
(
wchar_type_node
);
wint_type_node
=
TREE_TYPE
(
IDENTIFIER_GLOBAL_VALUE
(
get_identifier
(
WINT_TYPE
)));
wint_type_node
=
TREE_TYPE
(
IDENTIFIER_GLOBAL_VALUE
(
get_identifier
(
WINT_TYPE
)));
boolean_type_node
=
integer_type_node
;
boolean_type_node
=
integer_type_node
;
boolean_true_node
=
integer_one_node
;
boolean_true_node
=
integer_one_node
;
...
@@ -3070,8 +3074,7 @@ init_decl_processing ()
...
@@ -3070,8 +3074,7 @@ init_decl_processing ()
/* make a type for arrays of characters.
/* make a type for arrays of characters.
With luck nothing will ever really depend on the length of this
With luck nothing will ever really depend on the length of this
array type. */
array type. */
char_array_type_node
char_array_type_node
=
build_array_type
(
char_type_node
,
array_domain_type
);
=
build_array_type
(
char_type_node
,
array_domain_type
);
/* Likewise for arrays of ints. */
/* Likewise for arrays of ints. */
int_array_type_node
int_array_type_node
...
@@ -3083,8 +3086,7 @@ init_decl_processing ()
...
@@ -3083,8 +3086,7 @@ init_decl_processing ()
void_list_node
=
tree_cons
(
NULL_TREE
,
void_type_node
,
NULL_TREE
);
void_list_node
=
tree_cons
(
NULL_TREE
,
void_type_node
,
NULL_TREE
);
default_function_type
default_function_type
=
build_function_type
(
integer_type_node
,
NULL_TREE
);
=
build_function_type
(
integer_type_node
,
NULL_TREE
);
ptrdiff_type_node
ptrdiff_type_node
=
TREE_TYPE
(
IDENTIFIER_GLOBAL_VALUE
(
get_identifier
(
PTRDIFF_TYPE
)));
=
TREE_TYPE
(
IDENTIFIER_GLOBAL_VALUE
(
get_identifier
(
PTRDIFF_TYPE
)));
unsigned_ptrdiff_type_node
=
unsigned_type
(
ptrdiff_type_node
);
unsigned_ptrdiff_type_node
=
unsigned_type
(
ptrdiff_type_node
);
...
@@ -3483,7 +3485,8 @@ start_decl (declarator, declspecs, initialized, attributes, prefix_attributes)
...
@@ -3483,7 +3485,8 @@ start_decl (declarator, declspecs, initialized, attributes, prefix_attributes)
if
(
initialized
)
if
(
initialized
)
{
{
#if 0 /* Seems redundant with grokdeclarator. */
#if 0
/* Seems redundant with grokdeclarator. */
if (current_binding_level != global_binding_level
if (current_binding_level != global_binding_level
&& DECL_EXTERNAL (decl)
&& DECL_EXTERNAL (decl)
&& TREE_CODE (decl) != FUNCTION_DECL)
&& TREE_CODE (decl) != FUNCTION_DECL)
...
@@ -3765,7 +3768,8 @@ push_parm_decl (parm)
...
@@ -3765,7 +3768,8 @@ push_parm_decl (parm)
tree olddecl;
tree olddecl;
olddecl = lookup_name (DECL_NAME (decl));
olddecl = lookup_name (DECL_NAME (decl));
if (pedantic && olddecl != 0 && TREE_CODE (olddecl) == TYPE_DECL)
if (pedantic && olddecl != 0 && TREE_CODE (olddecl) == TYPE_DECL)
pedwarn_with_decl (decl, "ANSI C forbids parameter `%s' shadowing typedef");
pedwarn_with_decl (decl,
"ANSI C forbids parameter `%s' shadowing typedef");
}
}
#endif
#endif
...
@@ -3997,7 +4001,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
...
@@ -3997,7 +4001,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
{
{
if
(
ridpointers
[
i
]
==
id
)
if
(
ridpointers
[
i
]
==
id
)
{
{
if
(
i
==
(
int
)
RID_LONG
&&
specbits
&
(
1
<<
i
))
if
(
i
==
(
int
)
RID_LONG
&&
specbits
&
(
1
<<
i
))
{
{
if
(
longlong
)
if
(
longlong
)
error
(
"`long long long' is too long for GCC"
);
error
(
"`long long long' is too long for GCC"
);
...
@@ -4042,7 +4046,8 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
...
@@ -4042,7 +4046,8 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
else
if
(
TREE_CODE
(
id
)
!=
ERROR_MARK
)
else
if
(
TREE_CODE
(
id
)
!=
ERROR_MARK
)
type
=
id
;
type
=
id
;
found
:
{}
found
:
;
}
}
typedef_type
=
type
;
typedef_type
=
type
;
...
@@ -4067,7 +4072,8 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
...
@@ -4067,7 +4072,8 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
if
((
warn_implicit_int
||
warn_return_type
)
&&
funcdef_flag
)
if
((
warn_implicit_int
||
warn_return_type
)
&&
funcdef_flag
)
warn_about_return_type
=
1
;
warn_about_return_type
=
1
;
else
if
(
warn_implicit_int
||
flag_isoc99
)
else
if
(
warn_implicit_int
||
flag_isoc99
)
pedwarn_c99
(
"type defaults to `int' in declaration of `%s'"
,
name
);
pedwarn_c99
(
"type defaults to `int' in declaration of `%s'"
,
name
);
}
}
defaulted_int
=
1
;
defaulted_int
=
1
;
...
@@ -4082,7 +4088,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
...
@@ -4082,7 +4088,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
if
((
specbits
&
1
<<
(
int
)
RID_LONG
)
&&
!
longlong
if
((
specbits
&
1
<<
(
int
)
RID_LONG
)
&&
!
longlong
&&
TYPE_MAIN_VARIANT
(
type
)
==
double_type_node
)
&&
TYPE_MAIN_VARIANT
(
type
)
==
double_type_node
)
{
{
specbits
&=
~
(
1
<<
(
int
)
RID_LONG
);
specbits
&=
~
(
1
<<
(
int
)
RID_LONG
);
type
=
long_double_type_node
;
type
=
long_double_type_node
;
}
}
...
@@ -4143,7 +4149,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
...
@@ -4143,7 +4149,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
&&
TREE_CODE
(
type
)
!=
INTEGER_TYPE
&&
TREE_CODE
(
type
)
!=
REAL_TYPE
)
&&
TREE_CODE
(
type
)
!=
INTEGER_TYPE
&&
TREE_CODE
(
type
)
!=
REAL_TYPE
)
{
{
error
(
"complex invalid for `%s'"
,
name
);
error
(
"complex invalid for `%s'"
,
name
);
specbits
&=
~
(
1
<<
(
int
)
RID_COMPLEX
);
specbits
&=
~
(
1
<<
(
int
)
RID_COMPLEX
);
}
}
/* Decide whether an integer type is signed or not.
/* Decide whether an integer type is signed or not.
...
@@ -4259,7 +4265,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
...
@@ -4259,7 +4265,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
error
(
"function definition declared `register'"
);
error
(
"function definition declared `register'"
);
if
(
specbits
&
1
<<
(
int
)
RID_TYPEDEF
)
if
(
specbits
&
1
<<
(
int
)
RID_TYPEDEF
)
error
(
"function definition declared `typedef'"
);
error
(
"function definition declared `typedef'"
);
specbits
&=
~
((
1
<<
(
int
)
RID_TYPEDEF
)
|
(
1
<<
(
int
)
RID_REGISTER
)
specbits
&=
~
((
1
<<
(
int
)
RID_TYPEDEF
)
|
(
1
<<
(
int
)
RID_REGISTER
)
|
(
1
<<
(
int
)
RID_AUTO
));
|
(
1
<<
(
int
)
RID_AUTO
));
}
}
else
if
(
decl_context
!=
NORMAL
&&
nclasses
>
0
)
else
if
(
decl_context
!=
NORMAL
&&
nclasses
>
0
)
...
@@ -4271,7 +4277,8 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
...
@@ -4271,7 +4277,8 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
switch
(
decl_context
)
switch
(
decl_context
)
{
{
case
FIELD
:
case
FIELD
:
error
(
"storage class specified for structure field `%s'"
,
name
);
error
(
"storage class specified for structure field `%s'"
,
name
);
break
;
break
;
case
PARM
:
case
PARM
:
error
(
"storage class specified for parameter `%s'"
,
name
);
error
(
"storage class specified for parameter `%s'"
,
name
);
...
@@ -4280,7 +4287,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
...
@@ -4280,7 +4287,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
error
(
"storage class specified for typename"
);
error
(
"storage class specified for typename"
);
break
;
break
;
}
}
specbits
&=
~
((
1
<<
(
int
)
RID_TYPEDEF
)
|
(
1
<<
(
int
)
RID_REGISTER
)
specbits
&=
~
((
1
<<
(
int
)
RID_TYPEDEF
)
|
(
1
<<
(
int
)
RID_REGISTER
)
|
(
1
<<
(
int
)
RID_AUTO
)
|
(
1
<<
(
int
)
RID_STATIC
)
|
(
1
<<
(
int
)
RID_AUTO
)
|
(
1
<<
(
int
)
RID_STATIC
)
|
(
1
<<
(
int
)
RID_EXTERN
));
|
(
1
<<
(
int
)
RID_EXTERN
));
}
}
...
@@ -4405,9 +4412,11 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
...
@@ -4405,9 +4412,11 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
if
(
pedantic
)
if
(
pedantic
)
{
{
if
(
TREE_CONSTANT
(
size
))
if
(
TREE_CONSTANT
(
size
))
pedwarn
(
"ISO C89 forbids array `%s' whose size can't be evaluated"
,
name
);
pedwarn
(
"ISO C89 forbids array `%s' whose size can't be evaluated"
,
name
);
else
else
pedwarn
(
"ISO C89 forbids variable-size array `%s'"
,
name
);
pedwarn
(
"ISO C89 forbids variable-size array `%s'"
,
name
);
}
}
}
}
...
@@ -4434,7 +4443,8 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
...
@@ -4434,7 +4443,8 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
itype
=
build_index_type
(
itype
);
itype
=
build_index_type
(
itype
);
}
}
#if 0 /* This had bad results for pointers to arrays, as in
#if 0
/* This had bad results for pointers to arrays, as in
union incomplete (*foo)[4]; */
union incomplete (*foo)[4]; */
/* Complain about arrays of incomplete types, except in typedefs. */
/* Complain about arrays of incomplete types, except in typedefs. */
...
@@ -4446,7 +4456,8 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
...
@@ -4446,7 +4456,8 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
warning ("array type has incomplete element type");
warning ("array type has incomplete element type");
#endif
#endif
#if 0 /* We shouldn't have a function type here at all!
#if 0
/* We shouldn't have a function type here at all!
Functions aren't allowed as array elements. */
Functions aren't allowed as array elements. */
if (pedantic && TREE_CODE (type) == FUNCTION_TYPE
if (pedantic && TREE_CODE (type) == FUNCTION_TYPE
&& (constp || volatilep))
&& (constp || volatilep))
...
@@ -4462,7 +4473,8 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
...
@@ -4462,7 +4473,8 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
if
(
type_quals
)
if
(
type_quals
)
type
=
c_build_qualified_type
(
type
,
type_quals
);
type
=
c_build_qualified_type
(
type
,
type_quals
);
#if 0 /* don't clear these; leave them set so that the array type
#if 0
/* Don't clear these; leave them set so that the array type
or the variable is itself const or volatile. */
or the variable is itself const or volatile. */
type_quals = TYPE_UNQUALIFIED;
type_quals = TYPE_UNQUALIFIED;
#endif
#endif
...
@@ -4745,7 +4757,8 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
...
@@ -4745,7 +4757,8 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
type
=
build_array_type
(
c_build_qualified_type
(
TREE_TYPE
(
type
),
type
=
build_array_type
(
c_build_qualified_type
(
TREE_TYPE
(
type
),
type_quals
),
type_quals
),
TYPE_DOMAIN
(
type
));
TYPE_DOMAIN
(
type
));
#if 0 /* Leave the field const or volatile as well. */
#if 0
/* Leave the field const or volatile as well. */
type_quals = TYPE_UNQUALIFIED;
type_quals = TYPE_UNQUALIFIED;
#endif
#endif
}
}
...
@@ -4957,8 +4970,10 @@ grokparms (parms_info, funcdef_flag)
...
@@ -4957,8 +4970,10 @@ grokparms (parms_info, funcdef_flag)
TREE_TYPE
(
parm
)
=
error_mark_node
;
TREE_TYPE
(
parm
)
=
error_mark_node
;
}
}
}
}
#if 0 /* This has been replaced by parm_tags_warning
#if 0
which uses a more accurate criterion for what to warn about. */
/* This has been replaced by parm_tags_warning, which
uses a more accurate criterion for what to warn
about. */
else
else
{
{
/* Now warn if is a pointer to an incomplete type. */
/* Now warn if is a pointer to an incomplete type. */
...
@@ -4983,7 +4998,6 @@ grokparms (parms_info, funcdef_flag)
...
@@ -4983,7 +4998,6 @@ grokparms (parms_info, funcdef_flag)
}
}
}
}
/* Return a tree_list node with info on a parameter list just parsed.
/* Return a tree_list node with info on a parameter list just parsed.
The TREE_PURPOSE is a chain of decls of those parms.
The TREE_PURPOSE is a chain of decls of those parms.
The TREE_VALUE is a list of structure, union and enum tags defined.
The TREE_VALUE is a list of structure, union and enum tags defined.
...
@@ -5009,8 +5023,7 @@ get_parm_info (void_at_end)
...
@@ -5009,8 +5023,7 @@ get_parm_info (void_at_end)
But if the `void' is qualified (by `const' or `volatile') or has a
But if the `void' is qualified (by `const' or `volatile') or has a
storage class specifier (`register'), then the behavior is undefined;
storage class specifier (`register'), then the behavior is undefined;
by not counting it as the special case of `void' we will cause an
by not counting it as the special case of `void' we will cause an
error later. Typedefs for `void' are OK (see DR#157).
error later. Typedefs for `void' are OK (see DR#157). */
*/
if
(
void_at_end
&&
parms
!=
0
if
(
void_at_end
&&
parms
!=
0
&&
TREE_CHAIN
(
parms
)
==
0
&&
TREE_CHAIN
(
parms
)
==
0
&&
VOID_TYPE_P
(
TREE_TYPE
(
parms
))
&&
VOID_TYPE_P
(
TREE_TYPE
(
parms
))
...
@@ -5027,7 +5040,7 @@ get_parm_info (void_at_end)
...
@@ -5027,7 +5040,7 @@ get_parm_info (void_at_end)
/* Extract enumerator values and other non-parms declared with the parms.
/* Extract enumerator values and other non-parms declared with the parms.
Likewise any forward parm decls that didn't have real parm decls. */
Likewise any forward parm decls that didn't have real parm decls. */
for
(
decl
=
parms
;
decl
;
)
for
(
decl
=
parms
;
decl
;)
{
{
tree
next
=
TREE_CHAIN
(
decl
);
tree
next
=
TREE_CHAIN
(
decl
);
...
@@ -5038,7 +5051,8 @@ get_parm_info (void_at_end)
...
@@ -5038,7 +5051,8 @@ get_parm_info (void_at_end)
}
}
else
if
(
TREE_ASM_WRITTEN
(
decl
))
else
if
(
TREE_ASM_WRITTEN
(
decl
))
{
{
error_with_decl
(
decl
,
"parameter `%s' has just a forward declaration"
);
error_with_decl
(
decl
,
"parameter `%s' has just a forward declaration"
);
TREE_CHAIN
(
decl
)
=
new_parms
;
TREE_CHAIN
(
decl
)
=
new_parms
;
new_parms
=
decl
;
new_parms
=
decl
;
}
}
...
@@ -5440,7 +5454,8 @@ finish_struct (t, fieldlist, attributes)
...
@@ -5440,7 +5454,8 @@ finish_struct (t, fieldlist, attributes)
error_with_decl
(
TREE_CHAIN
(
x
),
"duplicate member `%s'"
);
error_with_decl
(
TREE_CHAIN
(
x
),
"duplicate member `%s'"
);
TREE_CHAIN
(
x
)
=
TREE_CHAIN
(
TREE_CHAIN
(
x
));
TREE_CHAIN
(
x
)
=
TREE_CHAIN
(
TREE_CHAIN
(
x
));
}
}
else
x
=
TREE_CHAIN
(
x
);
else
x
=
TREE_CHAIN
(
x
);
}
}
/* Now we have the nearly final fieldlist. Record it,
/* Now we have the nearly final fieldlist. Record it,
...
@@ -6124,8 +6139,7 @@ store_parm_decls ()
...
@@ -6124,8 +6139,7 @@ store_parm_decls ()
won't depend on its type. */
won't depend on its type. */
TREE_TYPE (dummy) = integer_type_node;
TREE_TYPE (dummy) = integer_type_node;
DECL_ARG_TYPE (dummy) = integer_type_node;
DECL_ARG_TYPE (dummy) = integer_type_node;
DECL_ARGUMENTS (fndecl)
DECL_ARGUMENTS (fndecl) = chainon (DECL_ARGUMENTS (fndecl), dummy);
= chainon (DECL_ARGUMENTS (fndecl), dummy);
}
}
#endif
#endif
...
@@ -6227,7 +6241,7 @@ store_parm_decls ()
...
@@ -6227,7 +6241,7 @@ store_parm_decls ()
TREE_PURPOSE
(
parm
)
=
found
;
TREE_PURPOSE
(
parm
)
=
found
;
/* Mark this decl as "already found" */
/* Mark this decl as "already found"
.
*/
DECL_WEAK
(
found
)
=
1
;
DECL_WEAK
(
found
)
=
1
;
}
}
...
@@ -6238,7 +6252,7 @@ store_parm_decls ()
...
@@ -6238,7 +6252,7 @@ store_parm_decls ()
any actual PARM_DECLs not matched with any names. */
any actual PARM_DECLs not matched with any names. */
nonparms
=
0
;
nonparms
=
0
;
for
(
parm
=
parmdecls
;
parm
;
)
for
(
parm
=
parmdecls
;
parm
;)
{
{
tree
next
=
TREE_CHAIN
(
parm
);
tree
next
=
TREE_CHAIN
(
parm
);
TREE_CHAIN
(
parm
)
=
0
;
TREE_CHAIN
(
parm
)
=
0
;
...
@@ -6270,8 +6284,9 @@ store_parm_decls ()
...
@@ -6270,8 +6284,9 @@ store_parm_decls ()
parm
=
next
;
parm
=
next
;
}
}
/* Chain the declarations together in the order of the list of names. */
/* Chain the declarations together in the order of the list of
/* Store that chain in the function decl, replacing the list of names. */
names. Store that chain in the function decl, replacing the
list of names. */
parm
=
specparms
;
parm
=
specparms
;
DECL_ARGUMENTS
(
fndecl
)
=
0
;
DECL_ARGUMENTS
(
fndecl
)
=
0
;
{
{
...
@@ -6530,7 +6545,7 @@ combine_parm_decls (specparms, parmlist, void_at_end)
...
@@ -6530,7 +6545,7 @@ combine_parm_decls (specparms, parmlist, void_at_end)
/* Complain about any actual PARM_DECLs not matched with any names. */
/* Complain about any actual PARM_DECLs not matched with any names. */
for
(
parm
=
parmdecls
;
parm
;
)
for
(
parm
=
parmdecls
;
parm
;)
{
{
tree
next
=
TREE_CHAIN
(
parm
);
tree
next
=
TREE_CHAIN
(
parm
);
TREE_CHAIN
(
parm
)
=
0
;
TREE_CHAIN
(
parm
)
=
0
;
...
@@ -6819,6 +6834,7 @@ pop_c_function_context (f)
...
@@ -6819,6 +6834,7 @@ pop_c_function_context (f)
}
}
/* Mark the language specific parts of F for GC. */
/* Mark the language specific parts of F for GC. */
void
void
mark_c_function_context
(
f
)
mark_c_function_context
(
f
)
struct
function
*
f
;
struct
function
*
f
;
...
@@ -6843,16 +6859,18 @@ copy_lang_decl (node)
...
@@ -6843,16 +6859,18 @@ copy_lang_decl (node)
}
}
/* Mark ARG for GC. */
/* Mark ARG for GC. */
void
void
lang_mark_false_label_stack
(
arg
)
lang_mark_false_label_stack
(
arg
)
struct
label_node
*
arg
;
struct
label_node
*
arg
;
{
{
/* C doesn't use false_label_stack. It better be NULL. */
/* C doesn't use false_label_stack. It better be NULL. */
if
(
arg
!=
NULL
)
if
(
arg
!=
NULL
)
abort
();
abort
();
}
}
/* Mark the language specific bits in T for GC. */
/* Mark the language specific bits in T for GC. */
void
void
lang_mark_tree
(
t
)
lang_mark_tree
(
t
)
tree
t
;
tree
t
;
...
@@ -6938,8 +6956,7 @@ do_case (low_value, high_value)
...
@@ -6938,8 +6956,7 @@ do_case (low_value, high_value)
if
(
low_value
==
NULL_TREE
)
if
(
low_value
==
NULL_TREE
)
success
=
pushcase
(
NULL_TREE
,
0
,
label
,
&
duplicate
);
success
=
pushcase
(
NULL_TREE
,
0
,
label
,
&
duplicate
);
else
if
(
high_value
==
NULL_TREE
)
else
if
(
high_value
==
NULL_TREE
)
success
=
pushcase
(
value1
,
convert_and_check
,
label
,
success
=
pushcase
(
value1
,
convert_and_check
,
label
,
&
duplicate
);
&
duplicate
);
else
else
success
=
pushcase_range
(
value1
,
value2
,
convert_and_check
,
success
=
pushcase_range
(
value1
,
value2
,
convert_and_check
,
label
,
&
duplicate
);
label
,
&
duplicate
);
...
@@ -6951,7 +6968,8 @@ do_case (low_value, high_value)
...
@@ -6951,7 +6968,8 @@ do_case (low_value, high_value)
else
else
error
(
"case label not within a switch statement"
);
error
(
"case label not within a switch statement"
);
}
}
else
if
(
success
==
2
)
{
else
if
(
success
==
2
)
{
if
(
low_value
==
NULL_TREE
)
if
(
low_value
==
NULL_TREE
)
{
{
error
(
"multiple default labels in one switch"
);
error
(
"multiple default labels in one switch"
);
...
@@ -6960,7 +6978,8 @@ do_case (low_value, high_value)
...
@@ -6960,7 +6978,8 @@ do_case (low_value, high_value)
else
else
error
(
"dupicate case value"
);
error
(
"dupicate case value"
);
if
(
high_value
!=
NULL_TREE
)
if
(
high_value
!=
NULL_TREE
)
error_with_decl
(
duplicate
,
"this is the first entry for that value"
);
error_with_decl
(
duplicate
,
"this is the first entry for that value"
);
}
}
else
if
(
low_value
!=
NULL_TREE
)
else
if
(
low_value
!=
NULL_TREE
)
{
{
...
@@ -6991,4 +7010,3 @@ set_current_function_name_declared (i)
...
@@ -6991,4 +7010,3 @@ set_current_function_name_declared (i)
{
{
abort
();
abort
();
}
}
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