On Wed, 2 Aug 2006, Michael C wrote:
> Hi,
>
> I am trying some porting examples to winscw and I have a question:
>
> Why is it that the MetroWerks CodeWarrior 3.1 cannot handle the following?
>
> in header file (pcb.h):
> int in_baddynamic (u_int16_t, u_int16_t);
>
> in c file (pcb.c)
> int
> in_baddynamic (a, b)
> u_int16_t a;
> u_int16_t b;
> {...}
>
> CodeWarrior complains with a 'identifier redeclared' error.
>
> Is it because the declaration is a different style to the definition?
Maybe, but this is legal C. There are a lot of cases in the tree where
the prototypes are converted to ANSI C, but the definiton not yet. We
spend quite some effort cleaning this up, but it's not done.
You can try to isolate the problem by making a small program
rperodcuing the error and sending it to MetroWerks. Or maybe there's
some option to switch off this behaviour... Anyway, this is not an
OpenBSD topic.
-Otto
> I am not use -strict, maybe the compiler just can't handle it?
>
> I have searched the whole tree and there is only one declaration and one
> definition.