Bug #97475 gcc 5.5.0 compilation warnings for router
Submitted: 4 Nov 2019 17:00 Modified: 14 Nov 2019 21:34
Reporter: Przemysław Skibiński (OCA) Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:8.0.18 OS:Any
Assigned to: CPU Architecture:Any

[4 Nov 2019 17:00] Przemysław Skibiński
gcc version 5.5.0 20171010 (Ubuntu 5.5.0-12ubuntu1) reports:

/data/mysql-server/mysql-8.0/router/src/http/src/tls_context.cc: In function ‘constexpr int o11x_version(TlsVersion)’:
/data/mysql-server/mysql-8.0/router/src/http/src/tls_context.cc:99:57: error: expression ‘<throw-expression>’ is not a constant-expression
       throw std::invalid_argument("version out of range");
2.                                              ^
/data/mysql-server/mysql-8.0/router/src/http/src/tls_server_context.cc: In constructor ‘TlsServerContext::TlsServerContext(TlsVersion, TlsVersion)’:
/data/mysql-server/mysql-8.0/router/src/http/src/tls_server_context.cc:67:43: error: statement has no effect [-Werror=unused-value]
   SSL_CTX_set_ecdh_auto(ssl_ctx_.get(), 1);
cc1plus: all warnings being treated as errors

How to repeat:

Suggested fix:
1. It seems to be gcc Bug 67371 - Never executed "throw" in constexpr function fails to compile
[5 Nov 2019 13:01] MySQL Verification Team
Hello Przemysław,

Thank you for the report and feedback.

[5 Nov 2019 13:02] MySQL Verification Team
Build results

Attachment: 97475.results (application/octet-stream, text), 125.79 KiB.

[13 Nov 2019 15:09] Jan Kneschke
Posted by developer:
The first part

  expression ‘<throw-expression>’ is not a constant-expression

is a duplicate of Bug#30406328
[14 Nov 2019 21:34] Philip Olson
Posted by developer:
Fixed as of the upcoming MySQL Router 8.0.19 release, and here's the changelog entry:

  Fixed gcc 5.5 compilation warnings.

Thank you for the bug report.