From f148814087a0dbf08c5c4185781fba2c0d3e83e1 Mon Sep 17 00:00:00 2001 From: Stefano Sanfilippo Date: Tue, 2 Dec 2014 17:28:42 +0100 Subject: [PATCH] g++ 4.6.x compatibility --- Makefile | 2 +- Nodes.hpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3bb8848..102b29b 100644 --- a/Makefile +++ b/Makefile @@ -24,8 +24,8 @@ bison2: patch2 default unpatch2 compile: bison Monicelli.ypp flex Monicelli.lpp - -Wall -Wno-deprecated-register -std=c++11 -DYYDEBUG=0 -O2 \ $(CXX) \ + -Wall -Wno-deprecated-register -std=c++0x -DYYDEBUG=0 -O2 \ Parser.cpp lex.yy.cc Nodes.cpp main.cpp -o mcc patch2: diff --git a/Nodes.hpp b/Nodes.hpp index 546a68e..572fa54 100644 --- a/Nodes.hpp +++ b/Nodes.hpp @@ -39,7 +39,10 @@ std::ostream& operator<<(std::ostream &stream, const Type &type); template -using Pointer = std::unique_ptr; +class Pointer: public std::unique_ptr { +public: + Pointer(T *p = nullptr): std::unique_ptr(p) {} +}; class Emittable {