On Tue, Sep 26, 2006 at 12:33:28AM -0400, Andrew Johnson wrote:
> struct point { int X; int Y; } *test = &((struct point){1, 1});
> 
> Is this a bug in compound literals support, or does tcc currently
> not support them at all?

I'm guessing you're defining them outside a function.  It seems to
have a problem with that.  It does appear to support them within
functions, with or without designated initializers.  For example:

  extern void foo(struct point *);

  void bar(void)
  {
    struct point * pp = &((struct point){1,1});
    foo(pp);
    foo(&((struct point){1,1}));
    foo(&((struct point){.X=1,.Y=1}));
  }

                                                  -Dave Dodge


_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to