I'll work on reproducing the difference in a C program and take it up with the appropriate body.

I've arrived at:
#include <stdio.h> #include <stdlib.h> #include <pthread.h> #include <mpfr.h> void *foo( void *ptr ); int main(void) { pthread_t thread1; char *message1 = "precision in thread1:"; int iret1; if(mpfr_buildopt_tls_p()) printf("mpfr was built with TLS support +\n"); else printf("mpfr was NOT built with TLS support\n"); mpfr_set_default_prec(101); iret1 = pthread_create( &thread1, NULL, foo, (void*) message1); pthread_join( thread1, NULL); printf("pthread_create() returned: %d\n",iret1); printf("Back in main: %d\n", mpfr_get_default_prec()); return 0; } void *foo( void * ptr) { char *message; message = (char *) ptr; mpfr_set_default_prec(201); printf("%s %d\n", message, mpfr_get_default_prec()); pthread_exit (NULL); }
It exhibits the same 12.2.0-versus-13.0.l anomaly.
If that C program is compiled using gcc-12.2.0, then the foo() sub reports that default precision is 201, but if it's compiled using gcc-13.0.1 then a default precision of 53 is reported.
According to the mpfr developers, it should report 201.
I'll see if I can get the mingw-w64 developers to shed some light on what's going awry.

Cheers,
Rob

In reply to Re^2: [Win32] differing threads behaviour by syphilis
in thread [Win32] differing threads behaviour by syphilis

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.