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?
> 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.
I cannot address the CodeWarrior directly, but sometimes things glitch
when the type of declaration made in pcb.h are made.
try instead in pcb.h
int in_baddynamic(u_int16_t a, u_int16_t b);
I agree, both types should compile. If this fixes it, you might complain
to MetroWerks.
Dave
--
Experience runs an expensive school, but fools will learn in no other.
-- Benjamin Franklin