This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RFA: hook signture patches (4/11): TARGET_ENUM_VA_LIST_P
- From: Joern Rennecke <amylaar at spamcop dot net>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 29 Jun 2010 22:00:06 -0400
- Subject: RFA: hook signture patches (4/11): TARGET_ENUM_VA_LIST_P
2010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
* target.def (enum_va_list_p): Use DEFHOOK.
* doc/tm.texi.in (TARGET_ENUM_VA_LIST_P): Use @hook.
Rename ptype to ptree.
* doc/tm.texi: Regenerate.
Index: doc/tm.texi
===================================================================
--- doc/tm.texi (revision 161563)
+++ doc/tm.texi (working copy)
@@ -4268,13 +4268,13 @@ This hook returns a type node for @code{
The default version of the hook returns @code{void*}.
@end deftypefn
-@deftypefn {Target Hook} int TARGET_ENUM_VA_LIST_P (int @var{idx}, const char ** @var{pname}, tree @var{ptype})
+@deftypefn {Target Hook} int TARGET_ENUM_VA_LIST_P (int @var{idx}, const char **@var{pname}, tree *@var{ptree})
This target hook is used in function @code{c_common_nodes_and_builtins}
to iterate through the target specific builtin types for va_list. The
variable @var{idx} is used as iterator. @var{pname} has to be a pointer
-to a @code{const char *} and @var{ptype} a pointer to a @code{tree} typed
+to a @code{const char *} and @var{ptree} a pointer to a @code{tree} typed
variable.
-The arguments @var{pname} and @var{ptype} are used to store the result of
+The arguments @var{pname} and @var{ptree} are used to store the result of
this macro and are set to the name of the va_list builtin type and its
internal type.
If the return value of this macro is zero, then there is no more element.
Index: doc/tm.texi.in
===================================================================
--- doc/tm.texi.in (revision 161563)
+++ doc/tm.texi.in (working copy)
@@ -4268,13 +4268,13 @@ This hook returns a type node for @code{
The default version of the hook returns @code{void*}.
@end deftypefn
-@deftypefn {Target Hook} int TARGET_ENUM_VA_LIST_P (int @var{idx}, const char ** @var{pname}, tree @var{ptype})
+@hook TARGET_ENUM_VA_LIST_P
This target hook is used in function @code{c_common_nodes_and_builtins}
to iterate through the target specific builtin types for va_list. The
variable @var{idx} is used as iterator. @var{pname} has to be a pointer
-to a @code{const char *} and @var{ptype} a pointer to a @code{tree} typed
+to a @code{const char *} and @var{ptree} a pointer to a @code{tree} typed
variable.
-The arguments @var{pname} and @var{ptype} are used to store the result of
+The arguments @var{pname} and @var{ptree} are used to store the result of
this macro and are set to the name of the va_list builtin type and its
internal type.
If the return value of this macro is zero, then there is no more element.
Index: target.def
===================================================================
--- target.def (revision 161563)
+++ target.def (working copy)
@@ -1488,8 +1478,7 @@ DEFHOOK
std_build_builtin_va_list)
/* Enumerate the va list variants. */
-/* ??? The documentation gets the type of ptree wrong. */
-DEFHOOK_UNDOC
+DEFHOOK
(enum_va_list_p,
"",
int, (int idx, const char **pname, tree *ptree),