diff options
author | Andrew Pinski <pinskia@gcc.gnu.org> | 2003-08-19 16:04:36 -0700 |
---|---|---|
committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2003-08-19 16:04:36 -0700 |
commit | 16b0d23f1bd79ad61f699172053507977a983593 (patch) | |
tree | 834cdfea4b4cd449e3fa6bf0ff16680067dece14 | |
parent | 02fa63cdf7a020cc47eb33f3d030fc77bc24a07a (diff) | |
download | gcc-16b0d23f1bd79ad61f699172053507977a983593.zip gcc-16b0d23f1bd79ad61f699172053507977a983593.tar.gz gcc-16b0d23f1bd79ad61f699172053507977a983593.tar.bz2 |
Missed part of my patch:
* langhooks-def.h (lhd_decl_uninit): Declare.
(LANG_HOOKS_DECL_UNINIT): New macro.
(LANG_HOOKS_INITIALIZER): Adjust.
* langhooks.h (struct lang_hooks): Add new field
decl_uninit.
* langhooks.c (lhd_decl_uninit): Define.
From-SVN: r70580
-rw-r--r-- | gcc/langhooks-def.h | 3 | ||||
-rw-r--r-- | gcc/langhooks.c | 8 | ||||
-rw-r--r-- | gcc/langhooks.h | 4 |
3 files changed, 15 insertions, 0 deletions
diff --git a/gcc/langhooks-def.h b/gcc/langhooks-def.h index 7bbaea2..56c24c7 100644 --- a/gcc/langhooks-def.h +++ b/gcc/langhooks-def.h @@ -63,6 +63,7 @@ extern void lhd_incomplete_type_error (tree, tree); extern tree lhd_type_promotes_to (tree); extern bool lhd_decl_ok_for_sibcall (tree); extern tree lhd_expr_size (tree); +extern bool lhd_decl_uninit (tree); extern size_t lhd_tree_size (enum tree_code); /* Declarations of default tree inlining hooks. */ @@ -114,6 +115,7 @@ extern void lhd_initialize_diagnostics (struct diagnostic_context *); #define LANG_HOOKS_PRINT_ERROR_FUNCTION lhd_print_error_function #define LANG_HOOKS_DECL_PRINTABLE_NAME lhd_decl_printable_name #define LANG_HOOKS_EXPR_SIZE lhd_expr_size +#define LANG_HOOKS_DECL_UNINIT lhd_decl_uninit #define LANG_HOOKS_TREE_SIZE lhd_tree_size #define LANG_HOOKS_FUNCTION_INIT lhd_do_nothing_f @@ -278,6 +280,7 @@ extern int lhd_tree_dump_type_quals (tree); LANG_HOOKS_DECL_PRINTABLE_NAME, \ LANG_HOOKS_PRINT_ERROR_FUNCTION, \ LANG_HOOKS_EXPR_SIZE, \ + LANG_HOOKS_DECL_UNINIT, \ LANG_HOOKS_ATTRIBUTE_TABLE, \ LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, \ LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, \ diff --git a/gcc/langhooks.c b/gcc/langhooks.c index b4c160f..665a06a 100644 --- a/gcc/langhooks.c +++ b/gcc/langhooks.c @@ -430,6 +430,14 @@ lhd_expr_size (tree exp) else return size_in_bytes (TREE_TYPE (exp)); } +/* lang_hooks.decl_uninit: Find out if a variable is uninitialized based + on DECL_INITIAL. */ + +bool +lhd_decl_uninit (tree t ATTRIBUTE_UNUSED) +{ + return false; +} /* lang_hooks.tree_size: Determine the size of a tree with code C, which is a language-specific tree code in category 'x'. The diff --git a/gcc/langhooks.h b/gcc/langhooks.h index 4ac0250..e097ee2 100644 --- a/gcc/langhooks.h +++ b/gcc/langhooks.h @@ -361,6 +361,10 @@ struct lang_hooks semantics in cases that it doesn't want to handle specially. */ tree (*expr_size) (tree); + /* Called from uninitialized_vars_warning to find out if a variable is + uninitialized based on DECL_INITIAL. */ + bool (*decl_uninit) (tree); + /* Pointers to machine-independent attribute tables, for front ends using attribs.c. If one is NULL, it is ignored. Respectively, a table of attributes specific to the language, a table of |