I want to define several macros to calculate the size of a type. The following is an example running normally.
#include <stdio.h>
#define A sizeof(long long) / sizeof(int)
#define B 36 / A
int main(){
printf("%zu %zu\n", A, B); // print out: 2 1
}
While it becomes strange when using SIMD vectors, for example (the definition of A)
#include <x86intrin.h>
#include <stdio.h>
#define A sizeof(__m128i) / sizeof(int)
#define B 36 / A
int main(){
printf("%zu %zu\n", A, B); // print out 4 0
}
What's the issue?