This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] correct TARGET_ADDR_SPACE_SUBSET_P documentation.


Hi, 
I notice the following description is different from how spu & m32c use it. 

In internal manual:

bool TARGET_ADDR_SPACE_SUBSET_P (addr space t superset, [Target Hook]
addr space t subset)
Define this to return whether the subset named address space is contained within the
superset named address space. Pointers to a named address space that is a subset
of another named address space will be converted automatically without a cast if
used together in arithmetic operations. Pointers to a superset address space can be
converted to pointers to a subset address space via explicit casts.

In spu & m32c ports:
m32c_addr_space_subset_p (addr_space_t subset, addr_space_t superset)
spu_addr_space_subset_p (addr_space_t subset, addr_space_t superset)

I believe the document is wrong. The first argument is subset and the second
one is superset. I attached the patch below. OK for trunk?


Cheers,
Bingfeng Mei

2011-09-26  Bingfeng Mei <bmei@broad.com>
	* doc/tm.texi: Correct documentation for TARGET_ADDR_SPACE_SUBSET_P.


Index: doc/tm.texi
===================================================================
--- doc/tm.texi (revision 178972)
+++ doc/tm.texi (working copy)
@@ -10256,7 +10256,7 @@ hook is the same as the @code{TARGET_LEG
 except that it includes explicit named address space support.
 @end deftypefn

-@deftypefn {Target Hook} bool TARGET_ADDR_SPACE_SUBSET_P (addr_space_t @var{superset}, addr_space_t @var{subset})
+@deftypefn {Target Hook} bool TARGET_ADDR_SPACE_SUBSET_P (addr_space_t @var{subset}, addr_space_t @var{superset})
 Define this to return whether the @var{subset} named address space is
 contained within the @var{superset} named address space.  Pointers to
 a named address space that is a subset of another named address space


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]