Open quickwritereader opened 3 years ago
This is intresting indeed. I also found there is some dependency on maltivec vs mvsx and ppc vs ppcle: https://godbolt.org/z/4bGsh8 It seems to swallow what comes after __vector
I was able to reproduce it on AT 14:
$ cat /tmp/test-vector.c
#include <altivec.h>
using vdbl = __vector double;
#define BREAK 1
$ /opt/at14.0/bin/g++ -c /tmp/test-vector.c
/tmp/test-vector.c:4:15: error: expected type-specifier before numeric constant
4 | #define BREAK 1
| ^
/tmp/test-vector.c:4:9: note: in expansion of macro ‘BREAK’
4 | #define BREAK 1
| ^~~~~
$ /opt/at14.0/bin/g++ -c /tmp/test-vector.c -std=c++14
$
@quickwritereader This looks like a general GCC bug, not limited to AT. Could you open a bug report upstream (gcc.gnu.org/bugzilla), please? Thanks!
AFAICS, this issue is still broken on AT 14. I'm reopening this issue so that we can use it to track the fix downstream.
I didn't find a bug report upstream for this issue, so I reported it: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101168
workaround 0:
-std=c++14
workaround 1:typedef __vector double vdbl;
workaround 2:using vdbl = __attribute__((altivec(vector__))) double;
workaround 3: putting dummy function betweenvoid dummy(){};