]> git.saurik.com Git - bison.git/blobdiff - src/complain.c
c++: style changes
[bison.git] / src / complain.c
index 984b13610d8297fe465962926634a9bd5f03c713..d43e623e933b6bac43b50dfecddeea65b7447061 100644 (file)
@@ -1,6 +1,6 @@
 /* Declaration for error-reporting function for Bison.
 
-   Copyright (C) 2000-2002, 2004-2006, 2009-2012 Free Software
+   Copyright (C) 2000-2002, 2004-2006, 2009-2013 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
@@ -28,6 +28,7 @@
 #include "complain.h"
 #include "files.h"
 #include "getargs.h"
+#include "quote.h"
 
 warnings warnings_flag =
   Wconflicts_sr | Wconflicts_rr | Wdeprecated  | Wother;
@@ -188,4 +189,18 @@ complain_args (location const *loc, warnings w, unsigned *indent,
     complain (loc, fatal, "too many arguments for complains");
     break;
   }
+
+}
+
+void
+deprecated_directive (location const *loc, char const *old, char const *upd)
+{
+  if (feature_flag & feature_caret)
+    complain (loc, Wdeprecated,
+              _("deprecated directive, use %s"),
+              quote_n (1, upd));
+  else
+    complain (loc, Wdeprecated,
+              _("deprecated directive: %s, use %s"),
+              quote (old), quote_n (1, upd));
 }