X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=diagnostic.h;h=8b5ef7767c5b549c9669494b6548668e9f22e53a;hb=6275ceca70721ec10e92124fb5bfa368e9db539b;hp=cb114ef856def5a97bdd1a341b117e7de2cc2bcb;hpb=152becd590dc065f730deea680aa32b7d1032286;p=cparser diff --git a/diagnostic.h b/diagnostic.h index cb114ef..8b5ef77 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,22 +45,27 @@ /** * Issue a diagnostic message. * Format types: - * %Y const symbol_t * - * %E const expression_t * - * %Q unsigned (qualifier) - * %T const type_t* - * %K const 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; +extern bool show_column; /**< Show column in diagnostic messages */ +extern bool diagnostics_show_option; /**< Show the switch, which controls a warning. */ #endif