On 13 October 2012 00:12, leif <[email protected]> wrote: > Bill Hart wrote: >> >> On 12 October 2012 23:19, Brian Gladman <[email protected]> wrote: >>> >>> -----Original Message----- From: Bill Hart >>> Sent: Friday, October 12, 2012 11:11 PM >>> >>> To: [email protected] >>> Subject: Re: [mpir-devel] MPIR 2.6.0 alpha1 released >>> >>> On 12 October 2012 23:06, Brian Gladman <[email protected]> wrote: >>>> >>>> >>>> -----Original Message----- From: Bill Hart >>>> Sent: Friday, October 12, 2012 10:58 PM >>>> >>>> To: [email protected] >>>> Subject: Re: [mpir-devel] MPIR 2.6.0 alpha1 released >>>> >>>> [snip] >>>> >>>> There are a couple more instances of _MSC_VER guards in mpirxx.h. Did >>>> you only mean to change two of them? >>>> >>>> ======================== >>>> No, I meant to do all of them - I'll go through this again. >>>> >>> >>> OK, I believe there are two more instances. >>> >>>> By the way, I have been going through the tests that use config.h and I >>>> have >>>> done about ten of them so far and I haven't found even one that actually >>>> needs config.h on Windows (i.e the test compiles and runs when this >>>> include >>>> is omitted). >>>> >>> >>> Well, we can try removing them and adding them back in if they are >>> actually needed. Probably they were only added for this specific >>> problem, which we've now resolved by simply excluding the relevant >>> code on Linux. >>> >>> ============================= >>> Ok, I'll go through them and take them out if they are not needed on >>> Windows. You can then test is this breaks the tests on *nix. >>> >>> On the print format issue for mp_limb_t, mp_limb_unsigned_t, intmax_t and >>> uintmax_t, mp_bitcnt_t, ... should we add format specifiers (or macros) >>> in >>> gmp_h.in where these types are defined? >>> >> >> Yeah, but I think the people who came up with this new "feature" of C >> compilers sat around a table late one night drinking vodka and decided >> to implement the most useless and most difficult to rectify "feature" >> their evil brains could concoct. So I am not convinced there are >> portable macros which actually work everywhere. So we are probably >> wasting our time trying. > > > Well, the crude macros (or what they expand to) are not a feature of the > compiler, but the implementation of the printf() and scanf() family of > functions, i.e., again the C library. (Although e.g. GCC actually > interprets format strings to eventually generate warnings.) > > > And while you cannot use sizeof() in preprocessor conditionals, you could of > course do things like > > printf(sizeof(foo)==sizeof(long)?"%ld\n":"%lld\n", foo); > > (or dynamically create/modify some format string variable in the code and > pass that). > > > -leif > > > P.S.: For the stdint.h / inttypes.h issue, you could at least include / use > them if __STDC_VERSION__ >= 199901L (and __STDC_HOSTED__ is defined ;-) ). > IIRC MPIR compiles its tests with '-std=c99' or '-std=gnu99' and the like if > possible anyway. >
Yeah but I bet that breaks it on Apple's GCC. Bill. -- You received this message because you are subscribed to the Google Groups "mpir-devel" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/mpir-devel?hl=en.
