Closed yilongli closed 5 years ago
I fixed the unused variable error.
Our goal is to support compilation with gcc and clang with C++11 support. My compilation worked with gcc 7.4. My system is:
akalia@akalianode-1:~/eRPC$ uname -r
4.15.0-47-generic
akalia@akalianode-1:~/eRPC$ g++ --version
g++ (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
What about compiler options -Wno-nested-anon-types
and -Wno-keyword-macro
? I can't find much info on these two options. Right now, I have to comment them out in CMakeLists.txt
to compile.
Perhaps try compiling again with the unused si
variable fix? The issue seems to be:
When an unrecognized warning option is requested (e.g., -Wunknown-warning), GCC emits a diagnostic stating that the option is not recognized. However, if the -Wno- form is used, the behavior is slightly different: no diagnostic is produced for -Wno-unknown-warning unless other diagnostics are being produced. This allows the use of new -Wno- options with old compilers, but if something goes wrong, the compiler warns that an unrecognized option is present.
Thanks, I didn't know that.
Hi Anuj, could you clarify which version of gcc is supported by eRPC? I am using gcc 7.4.0 that comes with Ubuntu 18.04 and it doesn't recognize options like
-Wno-nested-anon-types
and-Wno-keyword-macro
. Also, I got an unused variable error (which I fixed with(void)si;
) at: https://github.com/erpc-io/eRPC/blob/dff45896f7bb6bf43f38a8d7a7034c6ff79791f7/src/rpc_impl/rpc_disconnect_handlers.cc#L39