Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update flatbuffers to fix build on Clang trunk #557

Merged
merged 1 commit into from
Mar 8, 2020
Merged

Update flatbuffers to fix build on Clang trunk #557

merged 1 commit into from
Mar 8, 2020

Conversation

nabijaczleweli
Copy link
Contributor

@nabijaczleweli nabijaczleweli commented Mar 8, 2020

Didn't pin to any specific release since the previous describe was v1.10.0-105-ga1f14005 (updated to 1.11.0-236-gf73d205b).

Tested build on GCC from Debian archive:

nabijaczleweli@tarta:~$ g++ --version
g++ (Debian 8.3.0-6) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

And Clang trunk from LLVM archive:

nabijaczleweli@tarta:~$ c++ --version
clang version 11.0.0-++20200307120047+01c48d7d11e-1~exp1~20200307110643.632
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

flatbuffers hard-code general -Werror, which led to builds failing on
clang 11.0.0-++20200307120047+01c48d7d11e-1~exp1~20200307110643.632
with a plethora of
 ../extlib/flatbuffers/include/flatbuffers/flatbuffers.h:1720:25:
 error: definition of implicit copy constructor for
 'TableKeyComparator<reflection::Object>' is deprecated because it has
  a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
@nabijaczleweli
Copy link
Contributor Author

NB: that clang also catches this warning

[249/266] Building CXX object test/CMakeFiles/solvespace-testsuite.dir/constraint/comment/test.cpp.o
In file included from ../test/constraint/comment/test.cpp:1:
In file included from ../test/harness.h:6:
../src/solvespace.h:531:19: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
    typedef struct {
                  ^
                   UndoState
../src/solvespace.h:540:9: note: type is not C-compatible due to this member declaration
        void Clear() {
        ^~~~~~~~~~~~
../src/solvespace.h:547:7: note: type is given name 'UndoState' for linkage purposes by this typedef declaration
    } UndoState;
      ^
1 warning generated.

for every TU that includes solvespace.h, 120 times in my case. Certainly not critical, but drowns out other, more important warnings.

Sorry, something went wrong.

@whitequark whitequark merged commit c29624f into solvespace:master Mar 8, 2020
@nabijaczleweli nabijaczleweli deleted the fix-clang-trunk branch March 8, 2020 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants