OSDN Git Service

2004-08-04 Andrew Pinski <pinskia@physics.uc.edu>
[pf3gnuchains/gcc-fork.git] / gcc / toplev.h
index f12102e..64983ca 100644 (file)
@@ -45,28 +45,37 @@ extern void _fatal_insn (const char *, rtx, const char *, int, const char *)
    style, use the generic one.  */
 #ifndef GCC_DIAG_STYLE
 #define GCC_DIAG_STYLE __gcc_diag__
+#define NO_FRONT_END_DIAG
 #endif
 /* 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.  */
+   specifiers.  We must use custom format checks.  Note that at present
+   the front-end %D specifier is used in non-front-end code with some
+   functions, and those formats can only be checked in front-end code.  */
 #if GCC_VERSION >= 3005
 #define ATTRIBUTE_GCC_DIAG(m, n) __attribute__ ((__format__ (GCC_DIAG_STYLE, m, n))) ATTRIBUTE_NONNULL(m)
+#ifdef NO_FRONT_END_DIAG
+#define ATTRIBUTE_GCC_FE_DIAG(m, n) ATTRIBUTE_NONNULL(m)
+#else
+#define ATTRIBUTE_GCC_FE_DIAG(m, n) __attribute__ ((__format__ (GCC_DIAG_STYLE, m, n))) ATTRIBUTE_NONNULL(m)
+#endif
 #else
 #define ATTRIBUTE_GCC_DIAG(m, n) ATTRIBUTE_NONNULL(m)
+#define ATTRIBUTE_GCC_FE_DIAG(m, n) ATTRIBUTE_NONNULL(m)
 #endif
 extern void internal_error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2)
      ATTRIBUTE_NORETURN;
-extern void warning (const char *, ...);
-extern void error (const char *, ...);
+extern void warning (const char *, ...) ATTRIBUTE_GCC_FE_DIAG(1,2);
+extern void error (const char *, ...) ATTRIBUTE_GCC_FE_DIAG(1,2);
 extern void fatal_error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2)
      ATTRIBUTE_NORETURN;
-extern void pedwarn (const char *, ...);
-extern void sorry (const char *, ...);
+extern void pedwarn (const char *, ...) ATTRIBUTE_GCC_FE_DIAG(1,2);
+extern void sorry (const char *, ...) ATTRIBUTE_GCC_FE_DIAG(1,2);
 extern void inform (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2);
 
-extern void rest_of_decl_compilation (tree, const char *, int, int);
+extern void rest_of_decl_compilation (tree, int, int);
 extern void rest_of_type_compilation (tree, int);
-extern void rest_of_compilation (tree);
+extern void rest_of_compilation (void);
 extern void tree_rest_of_compilation (tree, bool);
 extern void init_tree_optimization_passes (void);
 extern void init_optimization_passes (void);
@@ -104,7 +113,6 @@ extern const char *aux_base_name;
 extern const char *aux_info_file_name;
 extern const char *asm_file_name;
 extern bool exit_after_options;
-extern bool version_flag;
 
 extern int target_flags_explicit;