help-gengetopt
[Top][All Lists]
Advanced

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

Re: [help-gengetopt] options with values and enum type


From: Lorenzo Bettini
Subject: Re: [help-gengetopt] options with values and enum type
Date: Wed, 31 Oct 2007 10:49:19 +0100
User-agent: Thunderbird 2.0.0.6 (X11/20071022)

J. David Bryan wrote:
On 26 Oct 2007 at 18:51, Lorenzo Bettini wrote:

actually, the implementation was quite easy, but it relies on enums being treated as int; does any of you know whether this is safe?

The C99 Standard (ISO 9899) says that it is:

   6.7.2.2 Enumeration specifiers

   The identifiers in an enumerator list are declared as constants that
   have type int and may appear wherever such are permitted.

   [...]

   Each enumerated type shall be compatible with char, a signed integer
   type, or an unsigned integer type. The choice of type is
   implementation-defined....



GREAT!

thanks David and Gyozo for confirming this :-)



I hope to get some feedback soon

I'll test it out with the programs that prompted by original post and report back.

Thanks for the updates!

thanks for the feedback!

hope to hear from you soon
cheers
        Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DSI, Univ. di Firenze
ICQ# lbetto, 16080134     (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com  http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net




reply via email to

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