/* */
/* */
/* */
-/* (C) 1998-2000 Ullrich von Bassewitz */
-/* Wacholderweg 14 */
-/* D-70597 Stuttgart */
-/* EMail: uz@musoftware.de */
+/* (C) 1998-2011, Ullrich von Bassewitz */
+/* Roemerstrasse 52 */
+/* D-70794 Filderstadt */
+/* EMail: uz@cc65.org */
/* */
/* */
/* This software is provided 'as-is', without any expressed or implied */
+#include <stdio.h>
+
/* common */
#include "attrib.h"
+#include "intstack.h"
+
+/* cc65 */
+#include "lineinfo.h"
extern unsigned ErrorCount;
extern unsigned WarningCount;
+/* Warning and error options */
+extern IntStack WarnEnable; /* Enable warnings */
+extern IntStack WarningsAreErrors; /* Treat warnings as errors */
+ /* Warn about: */
+extern IntStack WarnConstComparison; /* - constant comparison results */
+extern IntStack WarnNoEffect; /* - statements without an effect */
+extern IntStack WarnStructParam; /* - structs passed by val */
+extern IntStack WarnUnusedLabel; /* - unused labels */
+extern IntStack WarnUnusedParam; /* - unused parameters */
+extern IntStack WarnUnusedVar; /* - unused variables */
+extern IntStack WarnUnknownPragma; /* - unknown #pragmas */
+
/*****************************************************************************/
-void Warning (const char* Format, ...) attribute ((format (printf, 1, 2)));
-/* Print warning message. */
+void Fatal (const char* Format, ...) attribute ((noreturn, format (printf, 1, 2)));
+/* Print a message about a fatal error and die */
-void PPWarning (const char* Format, ...) attribute ((format (printf, 1, 2)));
-/* Print warning message. For use within the preprocessor. */
+void Internal (const char* Format, ...) attribute ((noreturn, format (printf, 1, 2)));
+/* Print a message about an internal compiler error and die. */
void Error (const char* Format, ...) attribute ((format (printf, 1, 2)));
/* Print an error message */
+void LIError (const LineInfo* LI, const char* Format, ...) attribute ((format (printf, 2, 3)));
+/* Print an error message with the line info given explicitly */
+
void PPError (const char* Format, ...) attribute ((format (printf, 1, 2)));
/* Print an error message. For use within the preprocessor. */
-void Fatal (const char* Format, ...) attribute ((noreturn, format (printf, 1, 2)));
-/* Print a message about a fatal error and die */
+void Warning (const char* Format, ...) attribute ((format (printf, 1, 2)));
+/* Print warning message. */
-void Internal (const char* Format, ...) attribute ((noreturn, format (printf, 1, 2)));
-/* Print a message about an internal compiler error and die. */
+void LIWarning (const LineInfo* LI, const char* Format, ...) attribute ((format (printf, 2, 3)));
+/* Print a warning message with the line info given explicitly */
+
+void PPWarning (const char* Format, ...) attribute ((format (printf, 1, 2)));
+/* Print warning message. For use within the preprocessor. */
+
+IntStack* FindWarning (const char* Name);
+/* Search for a warning in the WarnMap table and return a pointer to the
+ * intstack that holds its state. Return NULL if there is no such warning.
+ */
+
+void ListWarnings (FILE* F);
+/* Print a list of warning types/names to the given file */
void ErrorReport (void);
/* Report errors (called at end of compile) */