Correct doc of __builtin_nan

Geoffrey Keating gkeating@apple.com
Mon Apr 3 20:56:00 GMT 2006


One of our users pointed out that

    double d = __builtin_nan("z @ #$Q");

doesn't work, and the doc claims it should.

-- 
- Geoffrey Keating <geoffk@apple.com>

===File ~/patches/gcc-4131579.patch=========================
2006-04-03  Geoffrey Keating  <geoffk@apple.com>

	* doc/extend.texi (Other Builtins): Document that
	__builtin_nan is a compile-time constant only when its argument
	is valid.

Index: doc/extend.texi
===================================================================
--- doc/extend.texi	(revision 112548)
+++ doc/extend.texi	(working copy)
@@ -5734,11 +5734,12 @@
 truncated to fit the significand field provided.  The significand is
 forced to be a quiet NaN@.
 
-This function, if given a string literal, is evaluated early enough
-that it is considered a compile-time constant.
+This function, if given a string literal all of which would have been
+consumed by strtol, is evaluated early enough that it is considered a
+compile-time constant.
 @end deftypefn
 
 @deftypefn {Built-in Function} _Decimal32 __builtin_nand32 (const char *str)
============================================================



More information about the Gcc-patches mailing list