https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79942

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |documentation
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2017-03-07
                 CC|                            |msebor at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
Confirmed, although I think it's actually a documentation bug.  The built-in
calls the __cpu_indicator_init() function and returns what that function
returns.  __cpu_indicator_init() is declared to return int and defined in
libgcc/config/i386/cpuinfo.c where it's documented as follows:

/* A constructor function that is sets __cpu_model and __cpu_features with
   the right values.  This needs to run only once.  This constructor is
   given the highest priority and it should run before constructors without
   the priority set.  However, it still runs after ifunc initializers and
   needs to be called explicitly there.  */

int __attribute__ ((constructor CONSTRUCTOR_PRIORITY))
__cpu_indicator_init (void)
...

The function returns 0 on success and -1 on failure (e.g., when the cpuid
instruction is not supported).

Reply via email to