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
270c60bb
Commit
270c60bb
authored
Apr 07, 2007
by
Daniel Berlin
Committed by
Daniel Berlin
Apr 07, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2007-04-07 Daniel Berlin <dberlin@dberlin.org>
Revert change removing staticp. From-SVN: r123650
parent
ee57a661
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
62 additions
and
6 deletions
+62
-6
gcc/ChangeLog
+4
-0
gcc/c-common.c
+9
-0
gcc/c-common.h
+2
-0
gcc/c-objc-common.h
+2
-0
gcc/cp/ChangeLog
+4
-0
gcc/cp/cp-objcp-common.c
+15
-0
gcc/cp/cp-objcp-common.h
+2
-0
gcc/cp/cp-tree.h
+1
-0
gcc/langhooks-def.h
+3
-0
gcc/langhooks.c
+8
-0
gcc/langhooks.h
+3
-0
gcc/tree.c
+9
-5
gcc/tree.h
+0
-1
No files found.
gcc/ChangeLog
View file @
270c60bb
2007-04-07 Daniel Berlin <dberlin@dberlin.org>
Revert change removing staticp.
2007-04-07 Anatoly Sokolov <aesok@post.ru>
PR target/30289
...
...
gcc/c-common.c
View file @
270c60bb
...
...
@@ -4294,6 +4294,15 @@ c_expand_body (tree fndecl)
decl_fini_priority_lookup
(
fndecl
));
}
/* Hook used by staticp to handle language-specific tree codes. */
tree
c_staticp
(
tree
exp
)
{
return
(
TREE_CODE
(
exp
)
==
COMPOUND_LITERAL_EXPR
&&
TREE_STATIC
(
COMPOUND_LITERAL_EXPR_DECL
(
exp
))
?
exp
:
NULL
);
}
/* Given a boolean expression ARG, return a tree representing an increment
...
...
gcc/c-common.h
View file @
270c60bb
...
...
@@ -825,6 +825,8 @@ extern bool vector_types_convertible_p (tree t1, tree t2, bool emit_lax_note);
extern
rtx
c_expand_expr
(
tree
,
rtx
,
enum
machine_mode
,
int
,
rtx
*
);
extern
void
c_expand_body
(
tree
);
extern
tree
c_staticp
(
tree
);
extern
void
init_c_lex
(
void
);
extern
void
c_cpp_builtins
(
cpp_reader
*
);
...
...
gcc/c-objc-common.h
View file @
270c60bb
...
...
@@ -56,6 +56,8 @@ extern void c_initialize_diagnostics (diagnostic_context *);
#define LANG_HOOKS_FINISH_INCOMPLETE_DECL c_finish_incomplete_decl
#undef LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS
#define LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS true
#undef LANG_HOOKS_STATICP
#define LANG_HOOKS_STATICP c_staticp
#undef LANG_HOOKS_NO_BODY_BLOCKS
#define LANG_HOOKS_NO_BODY_BLOCKS true
#undef LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL
...
...
gcc/cp/ChangeLog
View file @
270c60bb
2007
-
04
-
07
Daniel
Berlin
<
dberlin
@
dberlin.org
>
Revert
change
removing
staticp.
2007
-
04
-
06
Daniel
Berlin
<
dberlin
@
dberlin.org
>
*
cp
-objcp-common.c
(
cxx_staticp
):
Remove.
...
...
gcc/cp/cp-objcp-common.c
View file @
270c60bb
...
...
@@ -200,6 +200,21 @@ cxx_types_compatible_p (tree x, tree y)
return
0
;
}
tree
cxx_staticp
(
tree
arg
)
{
switch
(
TREE_CODE
(
arg
))
{
case
BASELINK
:
return
staticp
(
BASELINK_FUNCTIONS
(
arg
));
default:
break
;
}
return
NULL_TREE
;
}
/* Stubs to keep c-opts.c happy. */
void
push_file_scope
(
void
)
...
...
gcc/cp/cp-objcp-common.h
View file @
270c60bb
...
...
@@ -59,6 +59,8 @@ extern tree objcp_tsubst_copy_and_build (tree, tree, tsubst_flags_t,
#define LANG_HOOKS_EXPAND_DECL c_expand_decl
#undef LANG_HOOKS_PARSE_FILE
#define LANG_HOOKS_PARSE_FILE c_common_parse_file
#undef LANG_HOOKS_STATICP
#define LANG_HOOKS_STATICP cxx_staticp
#undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL
#define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL cxx_dup_lang_specific_decl
#undef LANG_HOOKS_SET_DECL_ASSEMBLER_NAME
...
...
gcc/cp/cp-tree.h
View file @
270c60bb
...
...
@@ -4816,6 +4816,7 @@ extern bool cp_var_mod_type_p (tree, tree);
extern
void
cxx_initialize_diagnostics
(
struct
diagnostic_context
*
);
extern
int
cxx_types_compatible_p
(
tree
,
tree
);
extern
void
init_shadowed_var_for_decl
(
void
);
extern
tree
cxx_staticp
(
tree
);
/* in cp-gimplify.c */
extern
int
cp_gimplify_expr
(
tree
*
,
tree
*
,
tree
*
);
...
...
gcc/langhooks-def.h
View file @
270c60bb
...
...
@@ -49,6 +49,7 @@ extern tree lhd_return_tree (tree);
extern
tree
lhd_return_null_tree_v
(
void
);
extern
tree
lhd_return_null_tree
(
tree
);
extern
tree
lhd_do_nothing_iii_return_null_tree
(
int
,
int
,
int
);
extern
tree
lhd_staticp
(
tree
);
extern
void
lhd_print_tree_nothing
(
FILE
*
,
tree
,
int
);
extern
const
char
*
lhd_decl_printable_name
(
tree
,
int
);
extern
const
char
*
lhd_dwarf_name
(
tree
,
int
);
...
...
@@ -109,6 +110,7 @@ extern void lhd_omp_firstprivatize_type_sizes (struct gimplify_omp_ctx *,
#define LANG_HOOKS_EXPAND_EXPR lhd_expand_expr
#define LANG_HOOKS_EXPAND_DECL lhd_expand_decl
#define LANG_HOOKS_FINISH_INCOMPLETE_DECL lhd_do_nothing_t
#define LANG_HOOKS_STATICP lhd_staticp
#define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL lhd_do_nothing_t
#define LANG_HOOKS_SET_DECL_ASSEMBLER_NAME lhd_set_decl_assembler_name
#define LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS false
...
...
@@ -294,6 +296,7 @@ extern tree lhd_make_node (enum tree_code);
LANG_HOOKS_EXPAND_DECL, \
LANG_HOOKS_FINISH_INCOMPLETE_DECL, \
LANG_HOOKS_MARK_ADDRESSABLE, \
LANG_HOOKS_STATICP, \
LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, \
LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, \
LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS, \
...
...
gcc/langhooks.c
View file @
270c60bb
...
...
@@ -117,6 +117,14 @@ lhd_print_tree_nothing (FILE * ARG_UNUSED (file),
{
}
/* Called from staticp. */
tree
lhd_staticp
(
tree
ARG_UNUSED
(
exp
))
{
return
NULL
;
}
/* Called from check_global_declarations. */
bool
...
...
gcc/langhooks.h
View file @
270c60bb
...
...
@@ -324,6 +324,9 @@ struct lang_hooks
successful. */
bool
(
*
mark_addressable
)
(
tree
);
/* Hook called by staticp for language-specific tree codes. */
tree
(
*
staticp
)
(
tree
);
/* Replace the DECL_LANG_SPECIFIC data, which may be NULL, of the
DECL_NODE with a newly GC-allocated copy. */
void
(
*
dup_lang_specific_decl
)
(
tree
);
...
...
gcc/tree.c
View file @
270c60bb
...
...
@@ -1986,7 +1986,10 @@ staticp (tree arg)
return
arg
;
case
COMPONENT_REF
:
gcc_assert
(
TREE_CODE
(
TREE_OPERAND
(
arg
,
1
))
==
FIELD_DECL
);
/* If the thing being referenced is not a field, then it is
something language specific. */
if
(
TREE_CODE
(
TREE_OPERAND
(
arg
,
1
))
!=
FIELD_DECL
)
return
(
*
lang_hooks
.
staticp
)
(
arg
);
/* If we are referencing a bitfield, we can't evaluate an
ADDR_EXPR at compile time and so it isn't a constant. */
...
...
@@ -2012,10 +2015,11 @@ staticp (tree arg)
return
false
;
default
:
/* All language specific tree codes should have been lowered by
now. */
gcc_assert_lowered
(
arg
);
return
NULL
;
if
((
unsigned
int
)
TREE_CODE
(
arg
)
>=
(
unsigned
int
)
LAST_AND_UNUSED_TREE_CODE
)
return
lang_hooks
.
staticp
(
arg
);
else
return
NULL
;
}
}
...
...
gcc/tree.h
View file @
270c60bb
...
...
@@ -921,7 +921,6 @@ extern void omp_clause_range_check_failed (const tree, const char *, int,
#endif
#define gcc_assert_lowered(NODE) gcc_assert (TREE_CODE (NODE) <= LAST_AND_UNUSED_TREE_CODE)
#define TREE_BLOCK(NODE) *(tree_block (NODE))
#include "tree-check.h"
...
...
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