On 8/2/06, Otto Moerbeek <[EMAIL PROTECTED]> wrote:
On Wed, 2 Aug 2006, Michael C wrote:
...
> 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.
Legal GNU C, yes, but not legal ISO/ANSI C. This is a documented GNU
C extension; in the gcc info pages follow the "C Extensions" and then
"Function Prototypes" items.
Of course, OpenBSD has never supported compilation with anything but
*its own* gcc. This is just another example of an extension (albeit
one in plain gcc) that a compiler must support to correctly handle the
OpenBSD source tree.
Philip Guenther