<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/55719>55719</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            PPC 32-bit _SIZE_TYPE__ macro
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          ltertan
      </td>
    </tr>
</table>

<pre>
    **Testcase**:

```c
#include<stdio.h>
typedef unsigned short size_t;
int main() {
    printf("Hehe");
}
```

**Compile options**:
```shell
clang --target=ppc32 size_t.c
```
or
```shell
clang -c --target=ppc32 size_t.c -dM -E | grep SIZE_TYPE
```

**Error**:
```console
<source>:2:24: error: typedef redefinition with different types ('unsigned short' vs 'unsigned long')
typedef unsigned short size_t;
                       ^
/opt/clang/15.0.0/include/stddef.h:46:23: note: previous definition is here
typedef __SIZE_TYPE__ size_t;
                      ^
1 error generated.
Compiler returned: 1
```

The \_\_SIZE_TYPE__ macro is defined as **unsigned long** on PPC 32-bit (with it being 4 bytes wide, same as **unsigned int**). Is there any specific reason as to why PPC 32-bit is using **long** instead of int? ARM 32-bit and X86 both use **int** (again, all cases are 4 bytes wide).

Looking at https://github.com/llvm/llvm-project/blob/llvmorg-14.0.4/clang/lib/Basic/Targets/PPC.h#L376 and https://github.com/llvm/llvm-project/blob/llvmorg-14.0.4/clang/lib/Basic/Targets/PPC.h#L381 it would make sense to me that \_\_SIZE_TYPE__ would be **unsigned int** on Linux, but that's not the case.

**Summary**:
Is the fact that SizeType is UnsignedLong on the llvm::Triple::Linux, instead of UnsignedInt a bug or something intended?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzFVU1v2zgQ_TXyZWBBomzZPujgODY2QAoEGy_Q9mJQ0shiS4sCSSV1f_3OSLbrpMl2e6ogUxI_Zt6b90jnpjxmgVjSvUXnC-lw-AqSZRDdBtG5TaP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