Details
Description
Clang fails to compile with "clang++ -std=c++11" or "clang++ -std=c++11 -stdlib=libc++". Issue was mostly fixed in MySQL in response to this 2012 bug
/usr/ports/databases/mariadb101-server/work/mariadb-10.1.17/sql/sql_view.cc:765:3: error: non-constant-expression cannot be narrowed from type 'size_t' (aka 'unsigned long') to 'int' in initializer list [-Wc++11-narrowing]
|
my_offsetof(TABLE_LIST, mariadb_version),
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
/usr/ports/databases/mariadb101-server/work/mariadb-10.1.17/include/my_global.h:884:9: note: expanded from macro 'my_offsetof'
|
((size_t)((char *)&(((TYPE *)0x10)->MEMBER) - (char*)0x10))
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
/usr/ports/databases/mariadb101-server/work/mariadb-10.1.17/sql/sql_view.cc:765:3: note: override this message by inserting an explicit cast
|
my_offsetof(TABLE_LIST, mariadb_version),
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
static_cast<int>( )
|
/usr/ports/databases/mariadb101-server/work/mariadb-10.1.17/include/my_global.h:884:9: note: expanded from macro 'my_offsetof'
|
((size_t)((char *)&(((TYPE *)0x10)->MEMBER) - (char*)0x10))
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|