关于sizeof,malloc和gcc的一个报错

这是一个C程序,当我用gcc -Werror test.c进行编译时,gcc报错:

 test.c: In function ‘InitList’:
test.c:20:59: error: expected expression before ‘tItemType’
             tItemType *data = (tItemType *)malloc((sizeof tItemType) * LIST_MAX

代码如下:

 #include <stdlib.h>
#include <stdbool.h>

#define LIST_MAX_LEN 129
typedef int tItemType;
typedef struct List
{
    tItemType*      data;
    unsigned int    length;
} tList;

bool InitList(tList *l)
{
        if (l == NULL)
        {
            return false;
        }
        else
        {
            tItemType *data = (tItemType *)malloc((sizeof tItemType) * LIST_MAX_LEN);
            if (data == NULL)
            {
                return false;
            }
            else
            {
                l->data = data;
                l->length = 0;
            }
        }
}

int main(int argc, char *argv[])
{
        tList l;

        return 0;
}

但是,当我把malloc那条语句改成

 tItemType *data = (tItemType *)malloc((sizeof(tItemType)) * LIST_MAX_LEN);

时,也就是将tItemType用括号抱起来之后,gcc没有再报错。这是为什么呢?
sizeof是C语言的一个关键字,sizeof tItemType和sizeof(tItemType)应该是没有区别的。这到底是怎么回事呢?

sizeof 在计算变量所占空间大小时,括号可以省略,而计算类型(模子)大小时不能省略

对于c语言来说sizeof要有括号

sizeof 需要加上括号

sizeof格式该是sizeof()这样