This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: How to clear compile error when using rdrand64_step due to typedef'ing a 64-bit type?
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Jeffrey Walton <noloader at gmail dot com>
- Cc: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Fri, 19 Aug 2016 09:53:07 +0100
- Subject: Re: How to clear compile error when using rdrand64_step due to typedef'ing a 64-bit type?
- Authentication-results: sourceware.org; auth=none
- References: <CAH8yC8nB-rBT-YmWCv8-Di7hPhKYiOaxWib5k_Ms=33rRVX+SA@mail.gmail.com> <CAH6eHdReC5PY99B3daAe7KupbGwD6a4yOe6whM7UM3hAL0OtKg@mail.gmail.com> <CAH8yC8nMafHmEO=0v3_UU6Rm7gdzvfvG8+5J45Kony5W72h02Q@mail.gmail.com> <CAH6eHdS2ca5uc4HRis6r9-hM9-YheV0tiWov=fHxS=n7ZHK7UA@mail.gmail.com> <CAH8yC8kaqesT5nBT935kimFW8hkz_vCCU9gigkCjaUnpDBghqw@mail.gmail.com> <CAH6eHdQrhFX0=BKuc0A2ZD7YWL5z5M+jLFRwrwo-q-Fhsqwy0w@mail.gmail.com> <CAH8yC8kVeYe7q+uYDinD=FaPpqcwLq6EeQiwPwCxSMjzytGJfw@mail.gmail.com>
On 19 August 2016 at 09:07, Jeffrey Walton wrote:
>> You've basically gone chasing after some unrelated definition (that of
>> uint64_t) which has nothing to do with _rdrand64(), looking at
>> unrelated implementation details of that different type, and the
>> simple solution is to just use the type in the function declaration.
>
> That's how Intel documents it.
They document it as unsigned __int64 but that's not a standard type.
That's not a standard type. You found some definition of __int64 in a
different set of GCC headers and chased that, but there's no guarantee
that the header you looked in defined it consistently with how it's
used in the Intel docs.
> A long time ago I was told to use Intel's documentation because GCC
> does not provide it (cf.,
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=68081).
GCC might not document the function, but the header unambiguously
defines the function signature, and it takes unsigned long long*.