Sorry, but the GNU extension for binary constants is not supported in our older C compiler, but is in our new C compiler (pgcc18). Assuming you’re using PGI 19.10, can you try using “pgcc18” instead?
“pgcc18” is currently in Beta but we’re expecting to make it the default early next year where it will be renamed to “pgcc” and the legacy “pgcc” renamed to “pgcc11”.
% cat bin.c
#include <stdio.h>
#include <stdlib.h>
int main() {
unsigned long n;
n = 12345678;
n = (n ^ (n << 8)) & 0b00000000111111110000000011111111; // (1)
n = (n ^ (n << 4)) & 0b00001111000011110000111100001111; // (2)
n = (n ^ (n << 2)) & 0b00110011001100110011001100110011; // (3)
n = (n ^ (n << 1)) & 0b01010101010101010101010101010101; // (4)
printf("%lu\n",n);
exit(0);
}
% pgcc bin.c
PGC-S-0037-Syntax error: Recovery attempted by deleting integer 0 (bin.c: 10)
PGC-S-0039-Use of undeclared variable b00000000111111110000000011111111 (bin.c: 10)
PGC-S-0037-Syntax error: Recovery attempted by deleting integer 0 (bin.c: 11)
PGC-S-0039-Use of undeclared variable b00001111000011110000111100001111 (bin.c: 11)
PGC-S-0037-Syntax error: Recovery attempted by deleting integer 0 (bin.c: 12)
PGC-S-0039-Use of undeclared variable b00110011001100110011001100110011 (bin.c: 12)
PGC-S-0037-Syntax error: Recovery attempted by deleting integer 0 (bin.c: 13)
PGC-S-0039-Use of undeclared variable b01010101010101010101010101010101 (bin.c: 13)
PGC/x86-64 Linux 19.10-0: compilation completed with severe errors
% pgcc18 bin.c
% a.out
1364267092