X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=diagnostic.h;h=36b57b901091352c09176c6a267f36d6f012f930;hb=bf92df408b5fef01d5ee065b02c1deb7e4289a5b;hp=2ce3b5d852eb8a6fcafc99898c14e0a9b625c160;hpb=68a770de4603c696518d3dd2f278985262a1a2a2;p=cparser diff --git a/diagnostic.h b/diagnostic.h index 2ce3b5d..36b57b9 100644 --- a/diagnostic.h +++ b/diagnostic.h @@ -1,6 +1,6 @@ /* * This file is part of cparser. - * Copyright (C) 2007-2008 Matthias Braun + * Copyright (C) 2007-2009 Matthias Braun * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -22,6 +22,7 @@ #include #include "token_t.h" +#include "warning.h" /* define a NORETURN attribute */ #ifndef NORETURN @@ -44,25 +45,28 @@ /** * Issue a diagnostic message. * Format types: - * %Y const symbol_t * - * %E const expression_t * - * %Q unsigned (qualifier) - * %T type_t - * %K token_t - * %k token_kind_t - * %P const source_position_t * - * + * %E expression_t const* + * %K token_t const* + * %k token_kind_t + * %#k va_list*, char const* + * %N entity_t const* + * %#N entity_t const* + * %P source_position_t const* + * %Q unsigned (qualifier) + * %S string_t const* + * %T type_t const* + * %#T type_t const*, symbol_t const* + * %Y symbol_t const* */ void diagnosticf(const char *fmt, ...); void errorf(const source_position_t *pos, const char *fmt, ...); -void warningf(const source_position_t *pos, const char *fmt, ...); +void warningf(warning_t, const source_position_t *pos, const char *fmt, ...); NORETURN internal_errorf(const source_position_t *pos, const char *fmt, ...); extern unsigned diagnostic_count; extern unsigned error_count; extern unsigned warning_count; - -/* true if warnings should be inhibited */ -extern bool inhibit_all_warnings; +extern bool show_column; /**< Show column in diagnostic messages */ +extern bool diagnostics_show_option; /**< Show the switch, which controls a warning. */ #endif