Subject: Re: rpcgen and -fshort-enums round 2
To: None <firstname.lastname@example.org>
From: Christos Zoulas <email@example.com>
Date: 02/19/2002 14:33:55
In article <20020218222908.M21000@dr-evil.shagadelic.org>,
Jason R Thorpe <firstname.lastname@example.org> wrote:
>On Tue, Feb 19, 2002 at 05:46:16AM +0000, Christos Zoulas wrote:
> > I don't understand why we need fixed size enums in the api, since rpcgen
> > will generate code that converts back and forth to ints...
>rpcgen'd enums might be passed around as arguments or used in structures
>visible to the user of a shared library, at which point the size of the
>resulting type is quite important.
Yes, but only if the parameter type of the function is 'enum blah'.
If it is int/u_int, then there is no problem, because the default
promotions handle it.
foo(enum bar x)
can cause problems, but:
Maybe changing all functions that take enum args is easier.