summaryrefslogtreecommitdiff
path: root/gcc/toplev.h
diff options
context:
space:
mode:
authorbje <bje@138bc75d-0d04-0410-961f-82ee72b054a4>2009-05-22 06:08:04 +0000
committerbje <bje@138bc75d-0d04-0410-961f-82ee72b054a4>2009-05-22 06:08:04 +0000
commitb384c0ce966ed82f59f377953329551a4c7e8136 (patch)
tree4b432e3152a94643e4565b9c28ed77c00540b565 /gcc/toplev.h
parent0fb56989a8b13606c55c922b466c4a144255472c (diff)
downloadgcc-b384c0ce966ed82f59f377953329551a4c7e8136.tar.gz
* 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"). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147792 138bc75d-0d04-0410-961f-82ee72b054a4
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 08a89eab034..e62aa727606 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)