error: #pragma GCC diagnostic not allowed inside functions
tungnt22 opened this issue · 1 comments
Hi,
I'd have a running tacplus server, "Version: 201203071711" and am trying to upgrade to newer version (not sure what version is), when I try to compile and make, there's an error appeared as below
make[2]: Entering directory /tmp/event-driven-servers-master/build/linux-2.6.32-279.11.1.el6.i686-i686/mavis' gcc -Wall -W -Wno-strict-prototypes -Wno-implicit-fallthrough -DOSTYPE=linux -DOSLEVEL=0x02060020 -DOS="\"linux-2.6.32-279.11.1.el6.i686-i686\"" -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DWITH_CRYPT -DWITH_EPOLL -DWITH_POLL -DWITH_SELECT -DWITH_IPC -I/tmp/event-driven-servers-master -fPIC -fPIC -c -o libmavis_remote.o /tmp/event-driven-servers-master/mavis/libmavis_remote.c /tmp/event-driven-servers-master/mavis/libmavis_remote.c: In function ‘av_recv’: /tmp/event-driven-servers-master/mavis/libmavis_remote.c:122: error: #pragma GCC diagnostic not allowed inside functions /tmp/event-driven-servers-master/mavis/libmavis_remote.c:123: error: #pragma GCC diagnostic not allowed inside functions /tmp/event-driven-servers-master/mavis/libmavis_remote.c:125: error: #pragma GCC diagnostic not allowed inside functions At top level: cc1: warning: unrecognized command line option "-Wno-implicit-fallthrough" make[2]: *** [libmavis_remote.o] Error 1 make[2]: Leaving directory
/tmp/event-driven-servers-master/build/linux-2.6.32-279.11.1.el6.i686-i686/mavis'
make[1]: *** [install] Error 2
make[1]: Leaving directory `/tmp/event-driven-servers-master/mavis'
make: *** [install] Error 1
Please can you advise what the issue is, any missing library or something I need to install?
Hi,
you're likely using an outdated pre-4.6 GCC, please upgrade your tool-chain. Alternatively, you can just remove (or comment out) the #pragma.
Cheers,
Marc