Bill Hart wrote:
On 12 October 2012 23:19, Brian Gladman <b...@gladman.plus.com> wrote:
-----Original Message----- From: Bill Hart
Sent: Friday, October 12, 2012 11:11 PM

To: mpir-devel@googlegroups.com
Subject: Re: [mpir-devel] MPIR 2.6.0 alpha1 released

On 12 October 2012 23:06, Brian Gladman <b...@gladman.plus.com> wrote:

-----Original Message----- From: Bill Hart
Sent: Friday, October 12, 2012 10:58 PM

To: mpir-devel@googlegroups.com
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.

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

--
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To post to this group, send email to mpir-devel@googlegroups.com.
To unsubscribe from this group, send email to 
mpir-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/mpir-devel?hl=en.

Reply via email to