aboutsummaryrefslogtreecommitdiff
path: root/gcc/toplev.h
diff options
context:
space:
mode:
authorBen Elliston <bje@au.ibm.com>2009-05-22 06:08:04 +0000
committerBen Elliston <bje@gcc.gnu.org>2009-05-22 16:08:04 +1000
commit134ef63846ab66e47efb86eedae8c506d7baf93e (patch)
tree4b432e3152a94643e4565b9c28ed77c00540b565 /gcc/toplev.h
parent52fc669ddf3dce75979ba8f4a348e7be0b89af1b (diff)
downloadgcc-134ef63846ab66e47efb86eedae8c506d7baf93e.zip
gcc-134ef63846ab66e47efb86eedae8c506d7baf93e.tar.gz
gcc-134ef63846ab66e47efb86eedae8c506d7baf93e.tar.bz2
Makefile.in (bversion.h, s-bversion): New targets.
* Makefile.in (bversion.h, s-bversion): New targets. (TOPLEV_H): Add bversion.h. * toplev.h: Include "bversion.h". (ATTRIBUTE_GCC_DIAG): When building with checking disabled, use the __format__ attribute only if compiling with the same version of GCC as the sources (the "build version"). From-SVN: r147792
Diffstat (limited to 'gcc/toplev.h')
-rw-r--r--gcc/toplev.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/toplev.h b/gcc/toplev.h
index 08a89ea..e62aa727 100644
--- a/gcc/toplev.h
+++ b/gcc/toplev.h
@@ -21,6 +21,7 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_TOPLEV_H
#define GCC_TOPLEV_H
#include "input.h"
+#include "bversion.h"
/* If non-NULL, return one past-the-end of the matching SUBPART of
the WHOLE string. */
@@ -49,7 +50,7 @@ extern void _fatal_insn (const char *, const_rtx, const char *, int, const char
/* None of these functions are suitable for ATTRIBUTE_PRINTF, because
each language front end can extend them with its own set of format
specifiers. We must use custom format checks. */
-#if GCC_VERSION >= 4001
+#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)
#else
#define ATTRIBUTE_GCC_DIAG(m, n) ATTRIBUTE_NONNULL(m)