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] Actually use argument in documentation example for __builtin_types_compatible_p


The documentation example for __builtin_types_compatible_p consists of a
macro which takes an argument x of some type.  The macro declares a
temporary tmp of the same type, then uses __builtin_types_compatible_p
to dispatch to one of three functions based on the type of x.  However,
the calls to the three functions all look like this:
tmp = foo_type (tmp);
These calls don't use the macro argument x at all.  This patch changes
the calls to look like this:
tmp = foo_type (x);

I've tested this patch with "make info" and "make dvi".

ChangeLog entry: 
2006-06-30  Josh Triplett  <josh@freedesktop.org>

	* gcc/doc/extend.texi: Actually use the macro argument in the
	documentation example for __builtin_types_compatible_p.

Patch:
diff -Naur gcc-4.1.0.orig/gcc/doc/extend.texi gcc-4.1.0/gcc/doc/extend.texi
--- gcc-4.1.0.orig/gcc/doc/extend.texi	2006-02-14 08:12:56.000000000 -0800
+++ gcc-4.1.0/gcc/doc/extend.texi	2006-06-30 09:07:37.000000000 -0700
@@ -5455,11 +5455,11 @@
   (@{                                                           \
     typeof (x) tmp;                                             \
     if (__builtin_types_compatible_p (typeof (x), long double)) \
-      tmp = foo_long_double (tmp);                              \
+      tmp = foo_long_double (x);                                \
     else if (__builtin_types_compatible_p (typeof (x), double)) \
-      tmp = foo_double (tmp);                                   \
+      tmp = foo_double (x);                                     \
     else if (__builtin_types_compatible_p (typeof (x), float))  \
-      tmp = foo_float (tmp);                                    \
+      tmp = foo_float (x);                                      \
     else                                                        \
       abort ();                                                 \
     tmp;                                                        \

- Josh Triplett



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