Skip to content

Address a g++ compiler error and various warnings#50

Open
spakin wants to merge 1 commit into
niklasso:masterfrom
spakin:fix-c++
Open

Address a g++ compiler error and various warnings#50
spakin wants to merge 1 commit into
niklasso:masterfrom
spakin:fix-c++

Conversation

@spakin

@spakin spakin commented Feb 2, 2024

Copy link
Copy Markdown

g++ 11.4.0 rejects the minisat code on the following grounds:

./minisat/core/SolverTypes.h:55:16: error: friend declaration of ‘Minisat::Lit mkLit(Minisat::Var, bool)’ specifies default arguments and isn’t a definition [-fpermissive]
   55 |     friend Lit mkLit(Var var, bool sign = false);
      |                ^~~~~

This revision corrects that problem as well as an unused-variable warning and a bunch of literal-suffix warnings of the form,

./minisat/utils/Options.h:285:29: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
  285 |             fprintf(stderr, "%4"PRIi64, range.begin);
      |                             ^

```
./minisat/core/SolverTypes.h:55:16: error: friend declaration of ‘Minisat::Lit mkLit(Minisat::Var, bool)’ specifies default arguments and isn’t a definition [-fpermissive]
   55 |     friend Lit mkLit(Var var, bool sign = false);
      |                ^~~~~
```
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.

1 participant