bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getopt: How to know whether to pass char ** or char *const*?


From: Micah Cowan
Subject: Re: getopt: How to know whether to pass char ** or char *const*?
Date: Fri, 26 Oct 2007 09:53:28 -0700
User-agent: Thunderbird 1.5.0.13 (X11/20070824)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Bruno Haible wrote:
> Micah Cowan wrote:
>> How best do I determine in my code whether I'm using gnulib's
>> getopt_long, or the system library (potentially glibc)'s? That is, I
>> want to know whether I ought to be passing in a char ** or a
>> char*const*, whilst avoiding warnings and the like.
> 
> I would pass a 'char **': an implicit cast from 'char **' to 'char *const*'
> does not cause a warning.

Doh! Of course you're right. I was thinking of it like it was const
char**, which of course requires a diagnostic. I _knew_ I was missing
something!

- --
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer...
http://micah.cowan.name/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHIhuI7M8hyUobTrERCIVNAJ0TmU9PEU2XVnXn6/JxNBcIGd5qfwCeOwil
OIBDG/yhzMtopxCrYfNP7b0=
=E6uZ
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]