Bug 28884 - [4.2 Regression] TARGET_FUNCTION_VALUE not documented
Summary: [4.2 Regression] TARGET_FUNCTION_VALUE not documented
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.2.0
: P2 normal
Target Milestone: 4.2.0
Assignee: Richard Biener
URL: http://gcc.gnu.org/ml/gcc-patches/200...
Keywords: documentation, patch
Depends on:
Blocks:
 
Reported: 2006-08-29 07:48 UTC by Kazu Hirata
Modified: 2006-09-14 21:15 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-08-30 08:27:27


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kazu Hirata 2006-08-29 07:48:36 UTC
 
Comment 1 Andrew Pinski 2006-08-30 05:01:52 UTC
Confirmed, this was added on the mainline but an easy search of ChangeLog could not find it because the changeLog was incomplete:
        * target-def.h: New target hook function_value.
 

Note I think it is the same behavior as the FUNCTION_VALUE macro, well close.  It also handles FUNCTION_OUTGOING_VALUE.
Here is the default one:
rtx
default_function_value (tree ret_type ATTRIBUTE_UNUSED,
                        tree fn_decl_or_type,
                        bool outgoing ATTRIBUTE_UNUSED)
{
  /* The old interface doesn't handle receiving the function type.  */
  if (fn_decl_or_type
      && !DECL_P (fn_decl_or_type))
    fn_decl_or_type = NULL;

#ifdef FUNCTION_OUTGOING_VALUE
  if (outgoing)
    return FUNCTION_OUTGOING_VALUE (ret_type, fn_decl_or_type);
#endif

#ifdef FUNCTION_VALUE
  return FUNCTION_VALUE (ret_type, fn_decl_or_type);
#else
  return NULL_RTX;
#endif
}

Comment 2 Richard Biener 2006-08-30 08:27:27 UTC
Oh, it was indeed me.
Comment 3 Kazu Hirata 2006-09-14 21:15:19 UTC
Subject: Bug 28884

Author: kazu
Date: Thu Sep 14 21:15:12 2006
New Revision: 116951

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=116951
Log:
	PR middle-end/28884.
	* doc/tm.texi (TARGET_FUNCTION_VALUE): Document.
	(FUNCTION_VALUE, FUNCTION_OUTGOING_VALUE): Deprecate.
	Replace mentions of FUNCTION_VALUE and FUNCTION_OUTGOING_VALUE
	with TARGET_FUNCTION_VALUE.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/doc/tm.texi

Comment 4 Kazu Hirata 2006-09-14 21:15:52 UTC
Just checked in a patch.