X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/e9690142325711b320ef444768fdd40a087d02f7..327db05b226e6435185a9ac59ec0b5c162613e36:/src/complain.c diff --git a/src/complain.c b/src/complain.c index fdf773ee..fc73cfe4 100644 --- a/src/complain.c +++ b/src/complain.c @@ -1,6 +1,6 @@ /* Declaration for error-reporting function for Bison. - Copyright (C) 2000-2002, 2004-2006, 2009-2011 Free Software + Copyright (C) 2000-2002, 2004-2006, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -23,6 +23,7 @@ #include "system.h" #include +#include #include "complain.h" #include "files.h" @@ -73,10 +74,11 @@ error_message (location *loc, vfprintf (stderr, message, args); { size_t l = strlen (message); - if (l < 2 || message[l-2] != ':' || message[l-1] != ' ') { - putc ('\n', stderr); - fflush (stderr); - } + if (l < 2 || message[l-2] != ':' || message[l-1] != ' ') + { + putc ('\n', stderr); + fflush (stderr); + } } } @@ -98,7 +100,7 @@ void set_warning_issued (void) { static bool warning_issued = false; - if (!warning_issued && (warnings_flag & warnings_error)) + if (!warning_issued && (warnings_flag & Werror)) { fprintf (stderr, "%s: warnings being treated as errors\n", program_name); complaint_issued = true; @@ -109,7 +111,7 @@ set_warning_issued (void) void warn_at (location loc, const char *message, ...) { - if (!(warnings_flag & warnings_other)) + if (!(warnings_flag & Wother)) return; set_warning_issued (); ERROR_MESSAGE (&loc, _("warning"), message); @@ -119,7 +121,7 @@ void warn_at_indent (location loc, unsigned *indent, const char *message, ...) { - if (!(warnings_flag & warnings_other)) + if (!(warnings_flag & Wother)) return; set_warning_issued (); indent_ptr = indent; @@ -129,7 +131,7 @@ warn_at_indent (location loc, unsigned *indent, void warn (const char *message, ...) { - if (!(warnings_flag & warnings_other)) + if (!(warnings_flag & Wother)) return; set_warning_issued (); ERROR_MESSAGE (NULL, _("warning"), message); @@ -177,7 +179,7 @@ yacc_at (location loc, const char *message, ...) ERROR_MESSAGE (&loc, NULL, message); complaint_issued = true; } - else if (warnings_flag & warnings_yacc) + else if (warnings_flag & Wyacc) { set_warning_issued (); ERROR_MESSAGE (&loc, _("warning"), message); @@ -187,7 +189,7 @@ yacc_at (location loc, const char *message, ...) void midrule_value_at (location loc, const char *message, ...) { - if (!(warnings_flag & warnings_midrule_values)) + if (!(warnings_flag & Wmidrule_values)) return; set_warning_issued (); ERROR_MESSAGE (&loc, _("warning"), message);