The problem appears to come from the inclusion of editline/readline.h, which ultimately includes termios.h. I'm not sure who should "fix" this, but below is a simple reproducer demonstrating the error. In Spack, we have a patch to sqlite's shell.c that applies the undef trick that I use in the reproducer.
[lee218@ray23:20171218_sqlite_B0_macro]$ cat test.c #include <stdlib.h> #include <stdio.h> #include <editline/readline.h> #ifdef FIX #undef B0 #endif int main() { int B0 = 9; printf("B0 = %d\n", B0); return 0; } [lee218@ray23:20171218_sqlite_B0_macro]$ gcc test.c In file included from /usr/include/termios.h:40:0, from /usr/include/bits/ioctl-types.h:5, from /usr/include/sys/ioctl.h:29, from /usr/include/editline/readline.h:77, from test.c:3: test.c: In function 'main': test.c:9:9: error: expected identifier or '(' before numeric constant int B0 = 9; ^ [lee218@ray23:20171218_sqlite_B0_macro]$ gcc test.c -DFIX [lee218@ray23:20171218_sqlite_B0_macro]$ ________________________________ From: drhsql...@gmail.com <drhsql...@gmail.com> on behalf of Richard Hipp <d...@sqlite.org> Sent: Monday, December 18, 2017 6:55:40 PM To: Lee, Greg Cc: SQLite mailing list; sqlite-...@mailinglists.sqlite.org Subject: Re: [sqlite] Macro expansion of B0 on Linux PPC system On 12/18/17, Lee, Greg <lee...@llnl.gov> wrote: > I am still seeing the problem on Power 8 and others report the problem > persists on Power 9. Please see the spack github issue. I also attached a > configure/make output if that helps. So, what you are saying, then, is that "B0" is a reserved word on Power 8 and Power 9 systems, and can never be used as a local variable name? -- D. Richard Hipp d...@sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users