[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: argp, strndup and MinGW
From: |
Eric Blake |
Subject: |
Re: argp, strndup and MinGW |
Date: |
Fri, 20 Oct 2006 10:50:12 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) Gecko/20060909 Thunderbird/1.5.0.7 Mnenhy/0.7.4.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Paul Eggert on 10/19/2006 3:44 PM:
> You can safely ignore that diagnostic. Line 82 looks like this, right?
>
> ap->a.a_wide_char =
> (sizeof (wint_t) < sizeof (int)
> ? va_arg (args, int)
> : va_arg (args, wint_t));
>
> I assume that sizeof (wint_t) < sizeof (int) on your platform (please
> check this, though), so the diagnostic is about the va_arg (args,
> wint_t) subexpression that is never executed. Newer GCC versions get
> this right, and avoid generating the diagnostic in subexpressions that
> are not executed. Or maybe you just need to compile with -O.
That seems odd to me. On cygwin, sizeof (wchar_t) is 2, but sizeof
(wint_t) sizeof (int) are 4. And I assume the same is true for mingw,
since they are based on the same underlying OS.
- --
Life is short - so eat dessert first!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFOP5D84KuGfSFAYARArIOAJ0Y4zhMt9mLO/AbvadPGDUv2FA0IQCfWFV0
4s4OLH9kATLscAAHjAOKoJY=
=VkeC
-----END PGP SIGNATURE-----