Code Monkey home page Code Monkey logo

Comments (3)

springmeyer avatar springmeyer commented on August 16, 2024 1

we did resolve all warnings on Clang

Awesome.

We do still have warnings on GCC

Looks like the majority of the g++ compile warnings would be resolved by following mapbox/node-cpp-skel#42 and using -isystem for headers coming from mason and nan.

Within the noise are some ones for carmen-cache that should be fixed. They arise because of -Weffc++, which we enable specifically because it has better warnings in g++ than clang++:

../src/cpp_util.hpp:69:8: warning: ‘struct carmen::PhrasematchSubq’ has pointer data members [-Weffc++]
 struct PhrasematchSubq {
        ^~~~~~~~~~~~~~~
../src/cpp_util.hpp:69:8: warning:   but does not override ‘carmen::PhrasematchSubq(const carmen::PhrasematchSubq&)’ [-Weffc++]
../src/cpp_util.hpp:69:8: warning:   or ‘operator=(const carmen::PhrasematchSubq&)’ [-Weffc++]

This warning is a signal that we don't make clear in the code whether a shallow copy or deep copy of the cache pointer is needed/expected, which is important per https://en.wikipedia.org/wiki/Rule_of_three_(C%2B%2B_programming)

from carmen-cache.

apendleton avatar apendleton commented on August 16, 2024

We didn't get to this one in #116 but we did resolve all warnings on Clang. We do still have warnings on GCC, so figuring those out would be the barrier to getting this done. Some of them would probably just involve adding more warning pragma instructions, but at least one (our use of the __int128 type), I'm not sure how to resolve.

from carmen-cache.

springmeyer avatar springmeyer commented on August 16, 2024

I think this work is still important. If we don't pay attention to warnings we may be missing lurking bugs. The next step here would be to pull lots of the latest tooling from node-cpp-skel, which would take some care and manual fixes, but would bring in tooling and compiler tricks that would help catch and prevent bugs.

One gocha however is that node-cpp-skel latest has moved to mason-js and bundling its own clang++. This means that we can no longer ask for a source compile and must depend on binaries. After @miccolis moved us back to binaries for rocksdb this should be okay, but if in the future you need to source compile rocksdb again, you'd be stuck since mason-js only supports binaries and does not have a build command. If that point ever came you could use the mason bash scripts again for rocksdb, which would be somewhat messy (to use both mason bash and mason-js) but should work okay.

from carmen-cache.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.