-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] 0.24 fails with mpfr-4.1.0: error: expected unqualified-id #281
Comments
|
@yurivict This is quite weird... It turns out there's a switch in MPFR to select whether certain functions are implemented as macros rather than "real" C functions. The compilation error happens because mp++ is calling mpfr functions as if they were C functions (i.e., Strangely enough, I never ran into this issue. Can you check your |
|
|
|
@yurivict I checked again in my __MPFR_DECLSPEC int mpfr_set4 (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t, int);
__MPFR_DECLSPEC int mpfr_abs (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t);
__MPFR_DECLSPEC int mpfr_set (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t); // <-------
__MPFR_DECLSPEC int mpfr_neg (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t);
__MPFR_DECLSPEC int mpfr_signbit (mpfr_srcptr);Do you also have these declarations in your |
Yes. |
And they are not deactivated by any |
|
Here is this file: https://people.freebsd.org/~yuri/mpfr.h |
|
I can't really figure out what is going on. My Running complex &complex::abs()
{
static thread_local real tmp;
tmp.set_prec(get_prec());
::mpc_abs(tmp._get_mpfr_t(), &m_mpc, MPFR_RNDN);
::
# 679 "complex.cpp" 3 4
mpfr_set4(((
# 679 "complex.cpp"
&m_mpc
# 679 "complex.cpp" 3 4
)->re),
# 679 "complex.cpp"
tmp.get_mpfr_t()
# 679 "complex.cpp" 3 4
,
# 679 "complex.cpp"
MPFR_RNDN
# 679 "complex.cpp" 3 4
,((
# 679 "complex.cpp"
tmp.get_mpfr_t()
# 679 "complex.cpp" 3 4
)->_mpfr_sign))
# 679 "complex.cpp"
;So it seems to me like the compiler is indeed expanding the complex &complex::abs()
{
static thread_local real tmp;
tmp.set_prec(get_prec());
::mpc_abs(tmp._get_mpfr_t(), &m_mpc, MPFR_RNDN);
::mpfr_set4(((&m_mpc)->re),tmp.get_mpfr_t(),MPFR_RNDN,((tmp.get_mpfr_t())->_mpfr_sign));
::mpfr_set_zero(((&m_mpc)->im), 1);
return *this;
}So Would you be able to see what |
|
This command: outputs this: https://people.freebsd.org/~yuri/complex.cpp.txt |
|
@yurivict thanks for checking! The relevant part of the file is this: complex &complex::abs()
{
static thread_local real tmp;
tmp.set_prec(get_prec());
::mpc_abs(tmp._get_mpfr_t(), &m_mpc, MPFR_RNDN);
::__extension__ ({ mpfr_srcptr _p = (tmp.get_mpfr_t()); mpfr_set4(((&m_mpc)->re),_p,MPFR_RNDN,((_p)->_mpfr_sign)); });
::mpfr_set_zero(((&m_mpc)->im), 1);
return *this;
}So, for some reason, the However, it seems pretty clear at this point that I need to remove all the leading Thanks a lot for reporting, I'll ping back here when I start fixing mp++. |
|
Thanks! Have a happy vacation! Yuri |
|
Thanks! |
|
The problem is now gone, thank you! |
Describe the bug
This started when math/mpfr port was updated:
Log: http://beefy16.nyi.freebsd.org/data/130amd64-default/1684f47e9bea/logs/mppp-0.24_2.log (IPv6 URL)
OS: FreeBSD 13
The text was updated successfully, but these errors were encountered: