On 2020-10-23, Nick Bowler wrote:
> On 23/10/2020, Paul Eggert wrote:
>> On 10/22/20 6:09 PM, Russell Shaw wrote:
>>> else if(sizeof(time_t) == sizeof(long int)) {
>>
>> This is not the right kind of test. You want to test whether time_t and
>> int
>> are
>> the same types, not whether
On 23/10/2020, Paul Eggert wrote:
> On 10/22/20 6:09 PM, Russell Shaw wrote:
>> else if(sizeof(time_t) == sizeof(long int)) {
>
> This is not the right kind of test. You want to test whether time_t and int
> are
> the same types, not whether they're the same size. To do that, you should
> use
On 10/22/20 6:09 PM, Russell Shaw wrote:
else if(sizeof(time_t) == sizeof(long int)) {
This is not the right kind of test. You want to test whether time_t and int are
the same types, not whether they're the same size. To do that, you should use
code like this:
extern time_t foo;
extern
Yeah, though the idea is not to silence the compiler, but to find a solution to
the problem and make the compiler happy.
On 23/10/20 06:19, Peter Johansson wrote:
>
> On 23/10/20 6:39 pm, Russell Shaw wrote:
>> If the compiler complains, then maybe you could capture that complaint
>> output.
On 23/10/20 6:39 pm, Russell Shaw wrote:
If the compiler complains, then maybe you could capture that complaint
output.
Bit of a messy test.
When trying to detect compiler warnings, I've found AC_LANG_WERROR useful
> Is it not possible to always use "%lld" and always convert the
> arguments to (long long int)?
This is what I'm doing right now. GCC on Linux doesn't generate any
warnings in any case, though I'm not sure this is a clean way of doing
things, taking into account Clang on other archs and
On 23/10/20 6:06 pm, Russell Shaw wrote:
On 23/10/20 5:54 pm, Anatoli wrote:
Russell,
Thanks for your suggestion. The problem is, as I mentioned in the initial
post, on amd64 sizeof(time_t) is always 8 bytes, as well as long and long
long, so sizeof(time_t) == sizeof(long int) == sizeof(long
On 23/10/20 6:06 pm, Russell Shaw wrote:
On 23/10/20 5:54 pm, Anatoli wrote:
Russell,
Thanks for your suggestion. The problem is, as I mentioned in the initial
post, on amd64 sizeof(time_t) is always 8 bytes, as well as long and long
long, so sizeof(time_t) == sizeof(long int) == sizeof(long
Russell,
> If a platform has time_t the same size as a long and long long, does
> it matter whether the printf uses "%ld" or "%lld" ?
>From my first mail:
> For GNU C this is "the same" as both are of 8 bytes, but clang
> generates a warning like: "warning: format specifies type 'long' but
>
On 23/10/20 5:54 pm, Anatoli wrote:
Russell,
Thanks for your suggestion. The problem is, as I mentioned in the initial
post, on amd64 sizeof(time_t) is always 8 bytes, as well as long and long
long, so sizeof(time_t) == sizeof(long int) == sizeof(long long int).
I've actually tried the
Hello Anatoli,
Le jeudi 22 octobre 2020 à 19:23 -0300, Anatoli a écrit :
> #if (AC_TYPE(time_t) == "long long int")
> #define TIME_T_FMT "%lld"
> #elif (AC_TYPE(time_t) == "long int")
> #define TIME_T_FMT "%ld"
> #else
> #error dont know what to use for TIME_T_FMT
> #endif
Is it not possible to
Russell,
Thanks for your suggestion. The problem is, as I mentioned in the initial post,
on amd64 sizeof(time_t) is always 8 bytes, as well as long and long long, so
sizeof(time_t) == sizeof(long int) == sizeof(long long int).
I've actually tried the following directly in configure.ac (for
12 matches
Mail list logo