Aggregate initialization:
struct {
int a[3];int b;
} w[] = { {1} , 2};
sizeof (w) = 16w[0].a = 1, 0, 0w[0].b =2
sizeof(w) = 32w[0].a = 1, 0, 0w[0].b = 0w[1].a = 2, 0, 0w[1].b = 0
Incomplete struct, union, enum declaration
struct fq { int i; struct unknown;};
Does not allow incomplete struct, union, and enum declaration.
Switch expression integral type
Allows non-integral type.
Does not allow non-integral type.
Order of precedence
Allows:
if (rcount > count += index)
Does not allow:
unsigned, short, andlong typedef declarations
typedef short smallunsigned small;
Does not allow (all modes).
struct or union tag mismatch in nested struct or union declarations
Allows tag mismatch:
struct x { int i;} s1;/* K&R treats as a struct */{ union x s2;}
Does not allow tag mismatch in nested struct or union declaration.
Incomplete struct or union type
Ignores an incomplete type declaration.
struct x {int i;} s1;
main(){struct x;struct y {struct x f1
/* in K&R, f1 refers *//* to outer struct */} s2;struct x {int i;
};
}
Casts as lvalues
(char *) ip = &foo;
Does not allow casts as lvalues (all modes).