Subject: Re: rpcgen and -fshort-enums round 2
To: None <>
From: Christos Zoulas <>
List: tech-toolchain
Date: 02/19/2002 14:33:55
In article <>,
Jason R Thorpe <> 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:

foo(int x)

will not.

Maybe changing all functions that take enum args is easier.