This patch defines the macros __powerpc and __PPC on AIX to be consistent with XL for AIX. See: https://www.ibm.com/docs/en/xl-c-and-cpp-aix/13.1.0?topic=macros-related-platform
Note: GCC does not currently define __powerpc and __PPC so users should prefer the __powerpc__ and __PPC__ forms.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I'd like to see the rationale for adding these forms of the macros in the review and also in the extended commit message. These forms are being added primarily because the AIX XL compiler documented and defined them. The patch itself looks fine.
If XL only defines this on AIX, so should Clang. They only go into this location if XL defines them on both Linux and AIX.
The XL compiler only defined this weird form of the macros on AIX, but not on the XL Linux on Power compiler. I think it's preferable that we define these macros only on AIX and in the source/commit messages indicate that we're only doing so for AIX XL C/C++ compatibility. Users should prefer the PPC and powerpc macros.
clang/test/Preprocessor/init-ppc.c | ||
---|---|---|
525 | I suggest adding the negative test for the non AIX target for both PPC andpowerpc |
I suggest adding the negative test for the non AIX target for both PPC andpowerpc