Is this fragment of code a violation of strict aliasing rule:
int main()
{
    short tab[] = {1,2,3,4};
    int* ps = (int*)(&tab[0]);
    int i = *ps;
}
I do know that if this was in the opposite way it would be a violation
int main()
{
    int tab[] = {1,2,3,4};
    short* ps = (short*)(&tab[0]);
    short s = *ps;
}
 
     
     
    