Hi, 

For the following two cases:

A.  Anonymous structure type is a top-level type:

struct {
  int a;
  char c[] __attribute__ ((counted_by (a)));
};

B. Anonymous structure type is the type for an unnamed field of another 
structure:

struct s {
  int a;
  struct {
    int b;
    char c[] __attribute__ ((counted_by (a)));
  };
};


My question:

When C FE sees the above two anonymous structure type in A and B, how to 
distinguish them?
Is there a bit in IR can be used to determine whether a structure type is a 
top-level type or not?

I tried TYPE_CONTEXT (type) != NULL_TREE, seems not work...

thanks.

Qing

Reply via email to