Commit 12198c4 1 parent 4feb953 commit 12198c4 Copy full SHA for 12198c4
File tree 4 files changed +8
-6
lines changed
4 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 2
2
3
3
CXXFLAGS := -std=c++20 # use the 2020 version of the C++ standard
4
4
CXXFLAGS += -g # generate debugging information
5
- CXXFLAGS += -Wall # enable most warnings, except those about ...
6
- CXXFLAGS += -Wno-unused-parameter # ... unused function parameters, ...
7
- CXXFLAGS += -Wno-unused-variable # ... unused variables, ...
8
- CXXFLAGS += -Wno-unused-function # ... or unused functions.
5
+ CXXFLAGS += -Wall # enable most warnings
6
+ CXXFLAGS += -Wextra # enable extra warnings
7
+ CXXFLAGS += -Werror # treat all warnings as errors
9
8
CXXFLAGS += -fsanitize=address # enable address sanitization
10
9
CXXFLAGS += -static-libasan # statically link with Address Sanitizer
11
10
CXXFLAGS += -O0 # perform minimal optimisations
Original file line number Diff line number Diff line change 2
2
3
3
namespace ast {
4
4
5
- void IntConstant::EmitRISC (std::ostream& stream, Context& context ) const
5
+ void IntConstant::EmitRISC (std::ostream& stream, Context&) const
6
6
{
7
7
stream << " li a0, " << value_ << std::endl;
8
8
}
Original file line number Diff line number Diff line change 2
2
3
3
namespace ast {
4
4
5
- void Identifier::EmitRISC (std::ostream& stream, Context& context ) const
5
+ void Identifier::EmitRISC (std::ostream& stream, Context&) const
6
6
{
7
7
stream << identifier_;
8
8
}
Original file line number Diff line number Diff line change 7
7
extern " C" int fileno(FILE * stream);
8
8
9
9
#include " parser.tab.hpp"
10
+
11
+ // Suppress warning about unused function
12
+ [[maybe_unused]] static void yyunput (int c, char * yy_bp );
10
13
% }
11
14
12
15
D [0 - 9 ]
You can’t perform that action at this time.
0 commit comments