type-redef's (was: va_list used in <stdio.h>)

Norman Diamond diamond at csl.sony.co.jp
Tue Aug 22 20:54:14 AEST 1989


In article <3020 at solo1.cs.vu.nl> maart at cs.vu.nl (Maarten Litmaath) writes:
>>Why is a type-redef still forbidden?

In article <10784 at smoke.BRL.MIL> gwyn at brl.arpa (Doug Gwyn) writes:

>Because to do otherwise would result in severe parsing problems.

It is very believable that the parsing problems are severe.  However,
I believe that every C compiler already solves those parsing problems.

typedef int *(*my_type)();           /* my global type */

void my_func()
{
    typedef char ***my_type[5];      /* my local type */

(It would also be legal if my local type shadowed my global type instead
of being different.)

So parsers already have to be prepared for possible-typedef identifiers.

--
-- 
Norman Diamond, Sony Computer Science Lab (diamond%csl.sony.jp at relay.cs.net)
  The above opinions are inherited by your machine's init process (pid 1),
  after being disowned and orphaned.  However, if you see this at Waterloo or
  Anterior, then their administrators must have approved of these opinions.



More information about the Comp.std.c mailing list