4 ms·
My understanding is that if you declare some_concrete_type *p; some_other_type x; then, for example, sbpush(p, x); will result in a type error a
by tom_mellior 6y ago
My understanding is that if you declare
some_concrete_type *p;
some_other_type x;
then, for example,
sbpush(p, x);
will result in a type error as expected, since its core expands to:
p[some_index] = x;
So this is kind of type safe. There is an assumption that
((int *) <guaranteed aligned pointer>) + 2
will still be correctly aligned for any type. That's a pretty fair assumption on modern hardware, except maybe for SIMD types.