g++ 4.6.x compatibility

This commit is contained in:
Stefano Sanfilippo 2014-12-02 17:28:42 +01:00
parent e5fd0ed6bc
commit f148814087
2 changed files with 5 additions and 2 deletions

View File

@ -24,8 +24,8 @@ bison2: patch2 default unpatch2
compile: compile:
bison Monicelli.ypp bison Monicelli.ypp
flex Monicelli.lpp flex Monicelli.lpp
-Wall -Wno-deprecated-register -std=c++11 -DYYDEBUG=0 -O2 \
$(CXX) \ $(CXX) \
-Wall -Wno-deprecated-register -std=c++0x -DYYDEBUG=0 -O2 \
Parser.cpp lex.yy.cc Nodes.cpp main.cpp -o mcc Parser.cpp lex.yy.cc Nodes.cpp main.cpp -o mcc
patch2: patch2:

View File

@ -39,7 +39,10 @@ std::ostream& operator<<(std::ostream &stream, const Type &type);
template <class T> template <class T>
using Pointer = std::unique_ptr<T>; class Pointer: public std::unique_ptr<T> {
public:
Pointer(T *p = nullptr): std::unique_ptr<T>(p) {}
};
class Emittable { class Emittable {