THRIFT-3416 Retire old "xxx_namespace" declarations from the IDL
Client: Compiler (general)
Patch: Jens Geyer

This closes #700
diff --git a/compiler/cpp/src/main.cc b/compiler/cpp/src/main.cc
index 0674594..5e218b4 100644
--- a/compiler/cpp/src/main.cc
+++ b/compiler/cpp/src/main.cc
@@ -657,6 +657,20 @@
 }
 
 /**
+ * Prints deprecation notice for old NS declarations that are no longer supported
+ * If new_form is NULL, old_form is assumed to be a language identifier, such as "cpp"
+ * If new_form is not NULL, both arguments are used exactly as given
+ */
+void error_unsupported_namespace_decl(char* old_form, char* new_form) {
+  char* remainder = "";
+  if( new_form == NULL) {
+    new_form = old_form;
+    remainder = "_namespace";
+  }
+  failure("Unsupported declaration '%s%s'. Use 'namespace %s' instead.", old_form, remainder, new_form);
+}
+
+/**
  * Prints the version number
  */
 void version() {