ISO C issues with enum int

Juan Pablo L jpablolorenzetti at
Thu Feb 28 02:11:53 CET 2013

thanks for your answer, i m not really familiar with the limitations
of using strict C,
i appreciate your answer. thank you.

On 27 February 2013 18:33, Marc Lehmann <schmorp at> wrote:
> On Wed, Feb 27, 2013 at 04:41:10PM -0600, Juan Pablo L <jpablolorenzetti at> wrote:
>> i can not turned off the pedantic flag and for the above reason. any
>> suggestions ?
> You could get rid of the -Werror instead and it will work (with luck).
> By using those flags you tell gcc that the program you compile is strict
> ISO C, but neither your code nor libev can be strict ISO C, as it requires
> numerous extensions (such as POSIX, file descriptors, OS-specific
> extensions etc.).
> So while changing some things in libev might make it compile with those flags
> with some gcc versions, this is just because the implementatioon is imperfect
> and doesn't aim at catching those non-strict-ISO-C uses.
> Think about it: there is no way for you to use the features of libev in
> a strict ISO-C program, as there is no way to get e.g. a file descriptor
> for ev_io or a stat structure for ev_stat. There is no function to poll
> for I/O events in ISO C. Libev can't even call your callback in strict ISO
> C(!)
> So, while I will change the enum expressions to be of type in in CVS to
> accomodate this, you will likely run into continued problems if you lie
> about the programming language you are writing _your_ program in, telling
> GCC it's strict ISO-C, when it clearly isn't.
> You have to get rid of these flags - your request is quite the same as asking
> "I try to compile libev with a fortran compielr, but get syntax errors. Using
> a C compiler is not an option".
> But that isn't true. It is always an option. The only one, in fact.
> --
>                 The choice of a       Deliantra, the free code+content MORPG
>       -----==-     _GNU_    
>       ----==-- _       generation
>       ---==---(_)__  __ ____  __      Marc Lehmann
>       --==---/ / _ \/ // /\ \/ /      schmorp at
>       -=====/_/_//_/\_,_/ /_/\_\

More information about the libev mailing list