[Bug web/28575] New: misleading __builtin_choose_expr documentation error

twang at apple dot com gcc-bugzilla@gcc.gnu.org
Wed Aug 2 18:45:00 GMT 2006


This documentation error exists for all versions of gcc-3.*, gcc-4.*
documentation.

Relevant links are 
http://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Other-Builtins.html
http://gcc.gnu.org/onlinedocs/gcc-4.0.3/gcc/Other-Builtins.html

The error text is:
Built-in Function: type __builtin_choose_expr (const_exp, exp1, exp2)
You can use the built-in function __builtin_choose_expr to evaluate code
depending on the value of a constant expression. This built-in function returns
exp1 if const_exp, which is a constant expression that must be able to be
determined at compile time, is nonzero. 

--> Otherwise it returns 0.
should be
--> Otherwise it returns exp2.

This is confusing and misleading for the actual functionailty of the builtin,
it shold be changed.


-- 
           Summary: misleading __builtin_choose_expr documentation error
           Product: gcc
           Version: 4.0.1
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: web
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: twang at apple dot com
 GCC build triplet: powerpc-apple-darwin8
  GCC host triplet: powerpc-apple-darwin8
GCC target triplet: powerpc-apple-darwin8


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28575



More information about the Gcc-bugs mailing list