From 8bae11e85a4129990723d91488ccb74d3970c8a7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Charybdis=29?=
 <stephane.adjemian@univ-lemans.fr>
Date: Wed, 24 Jan 2018 22:15:57 +0100
Subject: [PATCH] Revert "macroprocessor: interpret arrays passed on the
 command line as arrays instead of strings. closes #1578"

Commit 204d9cd05fef9ac6fda8530536578c05fab66366 fails with gcc 4.9 (I checked that it works flawlessly
with 6.x). The error message is:

MacroDriver.cc:63:24: error: 'class std::basic_string<char>' has no member named 'front'
         if (it->second.front() == '[' && it->second.back() == ']')
                        ^
MacroDriver.cc:63:53: error: 'class std::basic_string<char>' has no member named 'back'
         if (it->second.front() == '[' && it->second.back() == ']')

Ideally we should bump the version of gcc used in the build system, but I will not do that before the
next bug fix release. I suppose it is easier to replace the front() and back() methods.
---
 macro/MacroDriver.cc | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/macro/MacroDriver.cc b/macro/MacroDriver.cc
index 446a9a9e..bd15152b 100644
--- a/macro/MacroDriver.cc
+++ b/macro/MacroDriver.cc
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008-2018 Dynare Team
+ * Copyright (C) 2008-2017 Dynare Team
  *
  * This file is part of Dynare.
  *
@@ -60,11 +60,7 @@ MacroDriver::parse(const string &f, const string &fb, const string &modfiletxt,
       }
     catch (boost::bad_lexical_cast &)
       {
-        if (it->second.front() == '[' && it->second.back() == ']')
-          // If the input is an array. Issue #1578
-          file_with_endl << "@#define " << it->first << " = " << it->second << endl;
-        else
-          file_with_endl << "@#define " << it->first << " = \"" << it->second << "\"" << endl;
+        file_with_endl << "@#define " << it->first << " = \"" << it->second << "\"" << endl;
       }
   file_with_endl << modfiletxt << endl;
 
-- 
GitLab