[PATCH] D102064: Parse vector bool when stdbool.h and altivec.h are included

Zarko Todorovski via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 11 09:53:21 PDT 2021


ZarkoCA added a comment.

In D102064#2751001 <https://reviews.llvm.org/D102064#2751001>, @uweigand wrote:

> This means the implementation now deviates from the documented vector extension syntax, right?   I guess it's strictly an extension of the documented syntax, but that may still lead to incompatibilities with other compilers for the platform.  If we want to make such a change, should it be synchronized with e.g. GCC, XL, etc. ?

GCC and XL already accept this syntax on Linux on Power and AIX.

For example this simple test case:

  #include <stdbool.h>
  #include <altivec.h>
  
  vector bool char bc;

Can compile with GCC 9/10 and XLC 16.1 on Linux on Power. On AIX, GCC 8.3 on AIX and XLC 16.1 can also compile it successfully.  Latest main trunk clang throws up an error on those platforms.

>From offline conversation it looks like XLC on z/OS can also compile the test case. @Everybody0523 can confirm for sure.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102064/new/

https://reviews.llvm.org/D102064



More information about the cfe-commits mailing list