lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 0b15cc0: Expunge certain ancient gcc workarou


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 0b15cc0: Expunge certain ancient gcc workarounds
Date: Thu, 9 Mar 2017 17:52:39 -0500 (EST)

branch: master
commit 0b15cc0d5285e7a379487386aeeb78ba5d550a1e
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Expunge certain ancient gcc workarounds
---
 comma_punct_test.cpp    | 10 +---------
 ledger_text_formats.cpp | 13 -------------
 2 files changed, 1 insertion(+), 22 deletions(-)

diff --git a/comma_punct_test.cpp b/comma_punct_test.cpp
index 4e7cdaa..50e7bf2 100644
--- a/comma_punct_test.cpp
+++ b/comma_punct_test.cpp
@@ -29,18 +29,10 @@
 #include <iostream>
 #include <sstream>
 
-// TODO ?? More tests should be added, but the one test written here
-// suffices to show a gcc defect that's fixed in a later version.
+// TODO ?? More tests should be added.
 
 int test_main(int, char*[])
 {
-#if defined __GNUC__ && LMI_GCC_VERSION <= 40001
-    std::cerr
-        << "This test fails with gcc versions before 4.0.1: see\n"
-        << "  http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20914\n";
-        ;
-#endif // gcc version less than 4.0.1 .
-
     std::ostringstream oss;
 
     std::locale loc;
diff --git a/ledger_text_formats.cpp b/ledger_text_formats.cpp
index 8a7a367..9a723f9 100644
--- a/ledger_text_formats.cpp
+++ b/ledger_text_formats.cpp
@@ -1191,19 +1191,6 @@ std::string ledger_format
         s += '%';
         }
 
-#if defined __GNUC__ && LMI_GCC_VERSION <= 40001
-    // COMPILER !! Work around a gcc defect fixed in gcc-4.0.1: see
-    //   http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20914
-    static std::string const old_string("-,");
-    static std::string const new_string("-");
-    std::string::size_type position = s.find(old_string);
-    while(position != std::string::npos)
-        {
-        s.replace(position, old_string.length(), new_string);
-        position = s.find(old_string, 1 + position);
-        }
-#endif // gcc version less than 4.0.1 .
-
     return s;
 }
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]