Re: pointer to incomplete types
From: Mitchell (cheeHATESPAMliang_at_inaHATESPAMme.coHATESPAMm)
Date: 05/15/04
- Next message: Mitchell: "Re: Program without main"
- Previous message: P.J. Plauger: "Re: Sine code for ANSI C"
- In reply to: Michael Birkmose: "pointer to incomplete types"
- Next in thread: Ben Pfaff: "Re: pointer to incomplete types"
- Reply: Ben Pfaff: "Re: pointer to incomplete types"
- Reply: Michael Birkmose: "Re: pointer to incomplete types"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 15 May 2004 10:10:22 +0800
On Fri, 14 May 2004 16:54:54 +0200, Michael Birkmose
<birkmose@cs.auc.dk> wrote:
>Hi everyone!,
>
>
>Are pointers to incomplete types allowed in ANSI C?
>
<snip>
>cdecl>
>declare function (pointer to array of int, pointer to int )returning void
>Warning: Unsupported in C -- 'Pointer to array of unspecified dimension'
> (maybe you mean "pointer to object")
>void f(int (*)[], int *)
That's odd. As Ben said, it is completely legal. "[]" is allowed in
function declarations too, as stated in K&R. I tend to prefer "int *"
in declarations as "[]" confuses me to the level of indirections
especially in crazy things like "float ***".
However... shouldn't "pointer to array of int" be written as "int []"
or its equivalent "int *"? Thus the declaration cdecl returned seems
wrong! What it returned seems to me like an array of pointers to int.
Someone familiar with cdecl comment please?
- Next message: Mitchell: "Re: Program without main"
- Previous message: P.J. Plauger: "Re: Sine code for ANSI C"
- In reply to: Michael Birkmose: "pointer to incomplete types"
- Next in thread: Ben Pfaff: "Re: pointer to incomplete types"
- Reply: Ben Pfaff: "Re: pointer to incomplete types"
- Reply: Michael Birkmose: "Re: pointer to incomplete types"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|