OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-dev/] [fsf-gcc-snapshot-1-mar-12/] [or1k-gcc/] [gcc/] [diagnostic-core.h] - Diff between revs 684 and 783

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 684 Rev 783
/* Declarations of core diagnostic functionality for code that does
/* Declarations of core diagnostic functionality for code that does
   not need to deal with diagnostic contexts or diagnostic info
   not need to deal with diagnostic contexts or diagnostic info
   structures.
   structures.
   Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007,
   Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007,
   2008, 2009, 2010
   2008, 2009, 2010
   Free Software Foundation, Inc.
   Free Software Foundation, Inc.
 
 
This file is part of GCC.
This file is part of GCC.
 
 
GCC is free software; you can redistribute it and/or modify it under
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
Software Foundation; either version 3, or (at your option) any later
version.
version.
 
 
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.
for more details.
 
 
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3.  If not see
along with GCC; see the file COPYING3.  If not see
<http://www.gnu.org/licenses/>.  */
<http://www.gnu.org/licenses/>.  */
 
 
#ifndef GCC_DIAGNOSTIC_CORE_H
#ifndef GCC_DIAGNOSTIC_CORE_H
#define GCC_DIAGNOSTIC_CORE_H
#define GCC_DIAGNOSTIC_CORE_H
 
 
#include "input.h"
#include "input.h"
#include "bversion.h"
#include "bversion.h"
 
 
/* Constants used to discriminate diagnostics.  */
/* Constants used to discriminate diagnostics.  */
typedef enum
typedef enum
{
{
#define DEFINE_DIAGNOSTIC_KIND(K, msgid) K,
#define DEFINE_DIAGNOSTIC_KIND(K, msgid) K,
#include "diagnostic.def"
#include "diagnostic.def"
#undef DEFINE_DIAGNOSTIC_KIND
#undef DEFINE_DIAGNOSTIC_KIND
  DK_LAST_DIAGNOSTIC_KIND,
  DK_LAST_DIAGNOSTIC_KIND,
  /* This is used for tagging pragma pops in the diagnostic
  /* This is used for tagging pragma pops in the diagnostic
     classification history chain.  */
     classification history chain.  */
  DK_POP
  DK_POP
} diagnostic_t;
} diagnostic_t;
 
 
extern const char *progname;
extern const char *progname;
 
 
extern const char *trim_filename (const char *);
extern const char *trim_filename (const char *);
 
 
/* If we haven't already defined a front-end-specific diagnostics
/* If we haven't already defined a front-end-specific diagnostics
   style, use the generic one.  */
   style, use the generic one.  */
#ifndef GCC_DIAG_STYLE
#ifndef GCC_DIAG_STYLE
#define GCC_DIAG_STYLE __gcc_tdiag__
#define GCC_DIAG_STYLE __gcc_tdiag__
#endif
#endif
/* None of these functions are suitable for ATTRIBUTE_PRINTF, because
/* None of these functions are suitable for ATTRIBUTE_PRINTF, because
   each language front end can extend them with its own set of format
   each language front end can extend them with its own set of format
   specifiers.  We must use custom format checks.  */
   specifiers.  We must use custom format checks.  */
#if (ENABLE_CHECKING && GCC_VERSION >= 4001) || GCC_VERSION == BUILDING_GCC_VERSION
#if (ENABLE_CHECKING && GCC_VERSION >= 4001) || GCC_VERSION == BUILDING_GCC_VERSION
#define ATTRIBUTE_GCC_DIAG(m, n) __attribute__ ((__format__ (GCC_DIAG_STYLE, m, n))) ATTRIBUTE_NONNULL(m)
#define ATTRIBUTE_GCC_DIAG(m, n) __attribute__ ((__format__ (GCC_DIAG_STYLE, m, n))) ATTRIBUTE_NONNULL(m)
#else
#else
#define ATTRIBUTE_GCC_DIAG(m, n) ATTRIBUTE_NONNULL(m)
#define ATTRIBUTE_GCC_DIAG(m, n) ATTRIBUTE_NONNULL(m)
#endif
#endif
extern void internal_error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2)
extern void internal_error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2)
     ATTRIBUTE_NORETURN;
     ATTRIBUTE_NORETURN;
/* Pass one of the OPT_W* from options.h as the first parameter.  */
/* Pass one of the OPT_W* from options.h as the first parameter.  */
extern bool warning (int, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3);
extern bool warning (int, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3);
extern bool warning_at (location_t, int, const char *, ...)
extern bool warning_at (location_t, int, const char *, ...)
    ATTRIBUTE_GCC_DIAG(3,4);
    ATTRIBUTE_GCC_DIAG(3,4);
extern void error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2);
extern void error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2);
extern void error_n (location_t, int, const char *, const char *, ...)
extern void error_n (location_t, int, const char *, const char *, ...)
    ATTRIBUTE_GCC_DIAG(3,5) ATTRIBUTE_GCC_DIAG(4,5);
    ATTRIBUTE_GCC_DIAG(3,5) ATTRIBUTE_GCC_DIAG(4,5);
extern void error_at (location_t, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3);
extern void error_at (location_t, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3);
extern void fatal_error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2)
extern void fatal_error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2)
     ATTRIBUTE_NORETURN;
     ATTRIBUTE_NORETURN;
/* Pass one of the OPT_W* from options.h as the second parameter.  */
/* Pass one of the OPT_W* from options.h as the second parameter.  */
extern bool pedwarn (location_t, int, const char *, ...)
extern bool pedwarn (location_t, int, const char *, ...)
     ATTRIBUTE_GCC_DIAG(3,4);
     ATTRIBUTE_GCC_DIAG(3,4);
extern bool permerror (location_t, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3);
extern bool permerror (location_t, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3);
extern void sorry (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2);
extern void sorry (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2);
extern void inform (location_t, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3);
extern void inform (location_t, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3);
extern void inform_n (location_t, int, const char *, const char *, ...)
extern void inform_n (location_t, int, const char *, const char *, ...)
    ATTRIBUTE_GCC_DIAG(3,5) ATTRIBUTE_GCC_DIAG(4,5);
    ATTRIBUTE_GCC_DIAG(3,5) ATTRIBUTE_GCC_DIAG(4,5);
extern void verbatim (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2);
extern void verbatim (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2);
extern bool emit_diagnostic (diagnostic_t, location_t, int,
extern bool emit_diagnostic (diagnostic_t, location_t, int,
                             const char *, ...) ATTRIBUTE_GCC_DIAG(4,5);
                             const char *, ...) ATTRIBUTE_GCC_DIAG(4,5);
extern bool seen_error (void);
extern bool seen_error (void);
 
 
#ifdef BUFSIZ
#ifdef BUFSIZ
  /* N.B. Unlike all the others, fnotice is just gettext+fprintf, and
  /* N.B. Unlike all the others, fnotice is just gettext+fprintf, and
     therefore it can have ATTRIBUTE_PRINTF.  */
     therefore it can have ATTRIBUTE_PRINTF.  */
extern void fnotice                     (FILE *, const char *, ...)
extern void fnotice                     (FILE *, const char *, ...)
     ATTRIBUTE_PRINTF_2;
     ATTRIBUTE_PRINTF_2;
#endif
#endif
 
 
#endif /* ! GCC_DIAGNOSTIC_CORE_H */
#endif /* ! GCC_DIAGNOSTIC_CORE_H */
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.